This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: sparc-sun-solaris2.8 headers: fixinc, cpplib
- To: RDBrown at mira dot net, RodneyBrown at mynd dot com
- Subject: Re: sparc-sun-solaris2.8 headers: fixinc, cpplib
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Thu, 28 Dec 2000 12:45:47 +0000
- Cc: gcc at gcc dot gnu dot org
- References: <E148VJr-00009g-00@urtur>
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.