This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
other/9472: [pch] error when creating pch still causes output
- From: bkoz at redhat dot com
- To: gcc-gnats at gcc dot gnu dot org
- Cc: geoffk at apple dot com
- Date: 28 Jan 2003 03:41:18 -0000
- Subject: other/9472: [pch] error when creating pch still causes output
- Reply-to: bkoz at redhat dot com
>Number: 9472
>Category: other
>Synopsis: [pch] error when creating pch still causes output
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 28 03:46:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Benjamin Kosnik
>Release: rh 7.3, head
>Organization:
>Environment:
Reading specs from /mnt/hd/ahimsa/bld-x86-gcc/gcc/specs
Configured with: /mnt/hd/bliss/src.gcc/gcc/configure --prefix=/mnt/hd/ahimsa/H-x86-gcc --enable-languages=c,c++ --enable-__cxa_atexit
Thread model: posix
gcc version 3.4 20030126 (experimental)
>Description:
Create a bogus C++ header, try to precompile it. You'll get a warning, AND a .pch file.
This is entirely unexpected: if gcc can't compile a file, it does not then write out an invalid .o file.
>How-To-Repeat:
%COMP.sh "-x c++-header -Winvalid-pch" ostream
/mnt/hd/ahimsa/bld-x86-gcc/i686-pc-linux-gnu/libstdc++-v3/include/bits/stl_algobase.h:149: warning: inline
function `const _Tp& std::min(const _Tp&, const _Tp&) [with _Tp = size_t]'
used but never defined
/usr/lib/crt1.o(.text+0x18): In function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status
%ll ostream.pch
-rw-rw-r-- 1 bkoz bkoz 7.0M Jan 27 21:37 ostream.pch
>Fix:
Don't write out the file.
>Release-Note:
>Audit-Trail:
>Unformatted: