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: more pch questions



On Monday, March 10, 2003, at 09:25 PM, Benjamin Kosnik wrote:



Geoff.


I'm debugging cc1plus when compiling the following

% cat > test.cc
#include <string>
#include <vector>

This is with the stdc++.h.gch patch as pointed out before, and a
generated stdc++.h.gch that seems to be valid, and in the correct place
as far as the search path.

It looks like the stdc++.h.gch file is indeed found (open_file_pch), but
ruled invalid in cpp_valid_state.


(gdb) f
#0 cpp_valid_state (r=0x85b8000, name=0xbfffdedc "/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/stdc++.h.gch", fd=7) at /mnt/hd/src/gcc/gcc/cpppch.c:474


at the "lose" part of the function cpp_valid_state, ie cpppch.c: 473

 fail:
  if (namebuf != NULL)
    free (namebuf);
  if (undeftab != NULL)
    free (undeftab);
  return 1;

(gdb) p namebuf
$54 = (unsigned char *) 0x85c7d28 "__GNUG__ 3EXP__ 1024 148623157e+308e-4932L"


Is this a simple case of __GNUC__ vs __GNUG__ ??

Try using '-Winvalid-pch'. This will give you a human-readable message rather than having to use GDB.


-- Geoff Keating <geoffk at apple dot com>


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