This is the mail archive of the
mailing list for the GCC project.
- 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
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
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.
Link Medical Limited,
Moor Place Farm,
Hampshire RG27 0RF
Tel : (+44) 0118 9326850
Fax : (+44) 0118 9326717
Email : email@example.com
Mobile: (+44) 7711 691880