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]
Other format: [Raw text]

Re: PCH not being used, but I can't tell why


Benjamin Kosnik <bkoz@redhat.com> writes:

> Geoff, pretty sure this is not a directory naming thing. 

Hmmm.  The 'x' means that indeed it's being found and is considered to
be invalid, so it ought to print out a message with -Winvalid-pch.  

Looking at the code, it seems like there are some exit paths from
cpp_valid_state that don't print a warning message.  Try this patch
and tell me if it helps.

*** cpppch.c.~1.10.~    Mon Jul 14 08:45:08 2003
--- cpppch.c    Mon Aug 11 12:08:01 2003
***************
*** 509,515 ****
        else if (cmp > 0)
        ++i;
        else
!       goto fail;
      }

    free(nl.defs);
--- 509,521 ----
        else if (cmp > 0)
        ++i;
        else
!       {
!         if (CPP_OPTION (r, warn_invalid_pch))
!           cpp_error (r, DL_WARNING_SYSHDR,
!                      "%s: not used because `%s' is defined",
!                      name, first);
!         goto fail;
!       }
      }


> %/mnt/hd/bld/gcc/gcc/g++ -shared-libgcc -B/mnt/hd/bld/gcc/gcc/ -nostdinc++ -L/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/src -L/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/src/.libs -B/mnt/hd/bld/H-x86-gcc/i686-pc-linux-gnu/bin/ -B/mnt/hd/bld/H-x86-gcc/i686-pc-linux-gnu/lib/ -isystem /mnt/hd/bld/H-x86-gcc/i686-pc-linux-gnu/include -isystem /mnt/hd/bld/H-x86-gcc/i686-pc-linux-gnu/sys-include -include bits/stdc++.h -g -O2 -ffunction-sections -fdata-sections -fmessage-length=0 -DLOCALEDIR="/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/po/share/locale" -nostdinc++ -I/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu -I/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include -I/mnt/hd/src/gcc/libstdc++-v3/libsupc++ -I/mnt/hd/src/gcc/libstdc++-v3/include/backward -I/mnt/hd/src/gcc/libstdc++-v3/testsuite /mnt/hd/src/gcc/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/3.cc -D_GLIBCXX_ASSERT -L/mnt/hd/bld/gcc/i686-pc-linux-gnu//libstdc!
++!
>  
> -v3/testsuite -lv3test -lm -H -o ./3.exe
> x /mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu/bits/stdc++.h.gch/O0g
> x /mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu/bits/stdc++.h.gch/O2g
> . /mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu/bits/stdc++.h
> . /mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/sstream
> .. /mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/istream
> ... /mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/ios
> .... /mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/iosfwd
> ..... /mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu/bits/c++config.h
> [snip]
> 
> -benjamin
> 

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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