include preprocess bug?

Neil Booth neil@daikokuya.co.uk
Thu Mar 20 21:21:00 GMT 2003


S.B.M. Post wrote:-

> 
> HI! I've noticed a difference between gcc 2.95.4 and gcc >= 2.96. I'm not
> sure if it is a bug so therefore i use the mail system. When i compile the
> following code, i get different results. (Test0.h indeed does not exist)
> (mailto:sbmpost@science.uva.nl)
> 
> bug.cpp
> -------------
> #include <stdio.h>
> #define NR "0"
> #include "Test" NR ".h"
> 
> gcc 2.95.4
> -------------
> bug.cpp:3: Test0.h: No Such file or directory
> 
> gcc >= 2.96
> -------------
> bug.cpp:3:17: warning: extra tokens at end of #include directive
> bug.cpp:3:24: Test: No such file or directory

2.95.4 should not accept the code you give it.

Neil.



More information about the Gcc-bugs mailing list