This is the mail archive of the gcc@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]

Re: CPP problem


On Wed, Mar 01, 2000 at 03:33:43PM +0100, Alexander Mojaev wrote:
> Hi Damjan,
> 
> i have this problemm too.
> 
> in my case:
> 
> x.h:
> 
> #ifndef _X_
> #define _X_
> #define Y 1
	  ^  I assume this was meant to be X ?

...
> 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. 

Hmmmm.  AFS has somewhat different semantics to real Unix
filesystems.  Would you please send the .i file and the output of

$ gcc z.c -I../../c/bug -v -H -E -dD -o z.i

-H is the same as --trace-includes; -dD causes #define lines to be
left in the output.

zw

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