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]

cpp include bug


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

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