This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
cpp bug
- From: Bob Kenny <bob at linkmed dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 23 May 2002 12:39:18 +0100
- Subject: cpp bug
- Organization: Link Medical Limited
Hi,
I have just upgraded from 2.95.2 to 3.0.1 and when compiling programs I
get a warning from the pre-processor saying
extra tokens at end of xxxxxx directive
This is caused by commands such as
#endif FRED
On looking at the code in cpplib.c in the routine ckeck_eol, the warning
is generated by cpp_pedwarn wich is a pedantic warning but there is no
test for the pedantic flag being set. I have overcome this by using
if (CPP_PEDANTIC (pfile) && token.type != CPP_EOF)
so that the warning is only issued if the pedantic flag is used.
Is this a bug or is it now a non-pedantic warning. In Solaris some of
their own .h files generate this warning so it is a bit annoying.
Thanks for all all your good work and the new features.
--
Regards
Bob
_______________________________________________________________________
Bob Kenny,
Link Medical Limited,
Unit 9,
Moor Place Farm,
Plough Lane
Bramshill,
Hampshire RG27 0RF
England
Tel : (+44) 0118 9326850
Fax : (+44) 0118 9326717
Email : bob@linkmed.org
Mobile: (+44) 7711 691880
_______________________________________________________________________