This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: sparc-sun-solaris2.8 headers: fixinc, cpplib


RDBrown@mira.net wrote:-

> I was attempting to hack together a test case for your system headers fix.
> The "warning: `xxx' defined but not used" is disabled if an include file
> is declared to be a system header with -isystem, but not if a
> #pragma GCC system_header
> is used.

Yes, this pragma is broken.  The front end doesn't see the effect,
only CPP.  I see various fixes; I'm not sure which to do right now:

a) Remove the pragma - it only exists on experimental GCCs anyway, and
you can achieve the same effect with #line, albeit more awkwardly.

b) Pass the pragma on to the front end as well as being processed by
cpplib.  This requires reworking of pragma handling, which needs to be
done anyway.

c) Get the front ends to ask CPP whether they are in a system header,
rather than trying to keep track themselves.

I think a combo of b) and c) is the right answer, but I don't have
time at the moment.

Neil.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]