This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
cpplib still warns about trigraphs in comments in 20000505
- To: gcc-bugs at gcc dot gnu dot org
- Subject: cpplib still warns about trigraphs in comments in 20000505
- From: Jason R Thorpe <thorpej at zembu dot com>
- Date: Fri, 5 May 2000 17:13:50 -0700
- Organization: Zembu Labs, Inc.
- Reply-To: thorpej at zembu dot com
Hi folks...
The following illustrates a bug in cpplib where it still warns about
trigraphs in comments if -Wall is enabled. The code that caused me
to notice this is a piece of code in the NetBSD kernel where the
author was apparently attempting to show puzzlement over something.
----- snip -----
/* The following should compile without warnings with `gcc -Wall'.
The trigraph (which is not intended as a trigraph) in the comment
should be ignored by CPP. */
int main() { return (0); } /* (what???) */
----- snip -----
With 20000505's CPP:
dr-evil:thorpej 24$ /usr/local/bin/gcc -Wall trigraph-bug.c
trigraph-bug.c:4:38: warning: trigraph ??) ignored
Since the NetBSD kernel is compiled with -Wall, lots of similar warnings
appear (the comment that produces the trigraph warning is in <sys/device.h>,
which is included by every device driver and by some file system code).
--
-- Jason R. Thorpe <thorpej@zembu.com>