CPP problem
Alexander Mojaev
mojaev@informatik.uni-tuebingen.de
Wed Mar 1 05:33:00 GMT 2000
Hi Damjan,
i have this problemm too.
in my case:
x.h:
#ifndef _X_
#define _X_
#define Y 1
#endif
y.h:
#ifndef _Y_
#define _Y_
#define Y 1
#endif
z.c:
#include <x.h>
#include <y.h>
void main()
{
return X + Y;
}
After cpp processing with "gcc z.c -I../../c/bug -E" :
void main()
{
return 1 + Y;
}
but with "gcc z.c -I. -E" it works fine. ../../c/bug/ = ./
gcc z.c -I../../c/bug --trace-includes
../../c/bug/x.h
../../c/bug/y.h
z.c: In function `main':
z.c:6: `Y' undeclared (first use in this function) ...
Only when installed in AFS causes this bug.
I think, that is a egcs preprocessor problem, because
with old gcc -v 2.7.2.3 (RedHat 5.2) it works correctly.
Regards,
--
Alexander Mojaev
Uni Tuebingen, WSI, Computer Architecture
Koestlinstr. 6, D-72074 Tuebingen, Germany
Phone: (+49/0) 7071 29 77174 Fax: (+49/0) 7071 92 2983
mailto:mojaev@informatik.uni-tuebingen.de
http://www-ra.informatik.uni-tuebingen.de/mitarb/mojaev/
More information about the Gcc
mailing list