This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: CPP problem
- To: gcc at gcc dot gnu dot org
- Subject: Re: CPP problem
- From: Alexander Mojaev <mojaev at informatik dot uni-tuebingen dot de>
- Date: Wed, 01 Mar 2000 15:33:43 +0100
- Organization: Lehrstuhl Rechnerarchitektur, Uni Tuebingen
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/