Ok,
After further looking into this, is seems that these are 2 separate issues. If you look at
https://bugs.eclipse.org/bugs/show_bug.cgi?id=413768#c2 it shows a use case that supposedly should work, but that is the exact use case that is broken for me (with one minor change). I will
explain.
Basically I have this situation:
a.c
|_ stddef.h (version S1)
|_ header.h
|_ stddef.h (version S2)
|_ use declaration found in S1
And these another source file that contains header.h
b.c
|_ header.h
| |_ stddef.h (version S1)
|_ use declaration found in S1
The problem comes into play where stddef.h has a #pragma once in it at the top of the file like:
#pragma once
#ifndef __STDDEF__
#define __STDDEF__
…….
#define NULL 0
……
#endif
The #pragma once is what is causing the problem. Since it is outside of the #ifndef block, it seems like the version of stddef.h that is included in header.h
is just simply not put in the index. So from b.c, the definition of NULL cannot be found.
Maybe this explains my problem a bit more.
Any help would be great.
Thanks,
Joseph Henry.
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Sergey Prigogin
Sent: Friday, September 20, 2013 1:08 PM
To: CDT General developers list.
Subject: Re: [cdt-dev] Help with Indexer Bug
On Fri, Sep 20, 2013 at 9:50 AM, Joseph Henry <Joseph.Henry@xxxxxxx> wrote:
Hi all,
I have filed bug
417193, which seems to be related to bug
413768.
I have not gotten much response on either of these bugs and was wondering if someone could point me in the right direction to fix this. I really need this bug fixed so I have been
looking into it, but cant seem to make any headway.
If anyone could point me in the right direction that would be great.
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev