cpp include bug

Dan Nicolaescu dann@godzilla.ICS.UCI.EDU
Fri May 26 22:14:00 GMT 2000


On a RedHat Linux 6.2 Intel machine

trying to compile the following files: 

---test.c----

#include <endian.h>
#include "endian.h"

int
main ()
{
  SOMETHING (1, 2);
}

---end test.c---

---endian.h----
JUNK JUNK JUNK
-end endian.h--


both files are in the same directory

with gcc from CVS checked out on May 26 9pm PDT

I get:

gcc-CVS/bin/gcc  test.c
/tmp/cchWFINF.o: In function `main':
/tmp/cchWFINF.o(.text+0xe): undefined reference to `SOMETHING'
collect2: ld returned 1 exit status

It looks like the preprocessor thinks that it should not preprocess
"endian.h" after it has seen #include <endian.h> 


with egcs-1.1.2 that came with the system I get: 

gcc test.c
test.c:4: syntax error before `int'

--dan


More information about the Gcc-bugs mailing list