This is the mail archive of the gcc-bugs@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]

cpplib still warns about trigraphs in comments in 20000505


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>

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