This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: CPP problem
- To: Alexander Mojaev <mojaev at informatik dot uni-tuebingen dot de>
- Subject: Re: CPP problem
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Wed, 1 Mar 2000 11:07:40 -0800
- Cc: gcc at gcc dot gnu dot org
- References: <38BD2A47.FA3CB115@informatik.uni-tuebingen.de>
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