public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
[parent not found: <bug-13675-4@http.gcc.gnu.org/bugzilla/>]
* [Bug pch/13675] New: #including a precompiled header more than once in the same unit fails
@ 2004-01-14  3:10 jbrandmeyer at earthlink dot net
  2004-01-14 12:29 ` [Bug pch/13675] " rwgk at yahoo dot com
                   ` (13 more replies)
  0 siblings, 14 replies; 24+ messages in thread
From: jbrandmeyer at earthlink dot net @ 2004-01-14  3:10 UTC (permalink / raw)
  To: gcc-bugs

This has also been observed on powerpc-apple-darwin6.8 with current sources as
of 1pm US Eastern time today when configured with ../gcc/configure
--enable-languages=c,c++ --program-suffix=-3.4
--enable-version-specific-runtime-libs

Both the C and C++ compilers are affected.

If a header file is precompiled and #included more than once in the same
compilation unit, the second inclusion generates an error like
"filename:linenumber:columnnumber calling fdopen: Bad file descriptor"

Consider this trivial example:
-----------pch-header.h-------
#ifndef PCH_HEADER_TEST_H
#define PCH_HEADER_TEST_H
extern int i;
#endif
----------another-pch-user.h-------
#include "pch-header.h"
----------pch-user1.cpp-------
#include "pch-header.h"
#include "another-pch-user.h"
---------------end----------
$ g++-3.4 -c -o pch-header.h.gch pch-header.h
$ g++-3.4 -c -o pch-user1.o pch-user1.cpp
In file included from pch-user1.cpp:2:
another-pch-user.h:1:24: calling fdopen: Bad file descriptor


$ g++-3.4 -v
Reading specs from /home/jonathan/lib/gcc/i686-pc-linux-gnu/3.4.0/specs
Configured with: ../gcc/configure --enable-languages=c,c++ --program-suffix=-3.4
--disable-checking --prefix=/home/jonathan
Thread model: posix
gcc version 3.4.0 20040108 (experimental)

-- 
           Summary: #including a precompiled header more than once in the
                    same unit fails
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: pch
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jbrandmeyer at earthlink dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13675


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2014-02-16 13:18 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-13675-6060@http.gcc.gnu.org/bugzilla/>
2006-04-01 23:19 ` [Bug pch/13675] #including a precompiled header more than once in the same unit fails rupert dot swarbrick at lineone dot net
2007-01-01 23:53 ` tim at klingt dot org
2007-05-17 23:06 ` tim at klingt dot org
2007-11-27  3:06 ` l dot bermes at eurokey dot de
2008-04-01 10:59 ` jakub at gcc dot gnu dot org
2008-10-17 20:20 ` jakub at gcc dot gnu dot org
2008-11-03 22:16 ` pinskia at gcc dot gnu dot org
2009-05-27 10:56 ` gafunchal at gmail dot com
2009-05-27 14:35 ` gafunchal at gmail dot com
     [not found] <bug-13675-4@http.gcc.gnu.org/bugzilla/>
2014-02-16 13:18 ` jackie.rosen at hushmail dot com
2004-01-14  3:10 [Bug pch/13675] New: " jbrandmeyer at earthlink dot net
2004-01-14 12:29 ` [Bug pch/13675] " rwgk at yahoo dot com
2004-01-15  2:00 ` geoffk at gcc dot gnu dot org
2004-04-17  0:43 ` geoffk at gcc dot gnu dot org
2004-04-17  5:13 ` geoffk at gcc dot gnu dot org
2004-04-17  5:22 ` jbrandmeyer at earthlink dot net
2004-04-17  9:29 ` geoffk at gcc dot gnu dot org
2004-04-17 10:41 ` geoffk at gcc dot gnu dot org
2004-04-17 12:40 ` geoffk at gcc dot gnu dot org
2004-04-24 19:09 ` pinskia at gcc dot gnu dot org
2004-04-24 20:45 ` v13 at it dot teithe dot gr
2004-06-03  3:55 ` pegasus at ifdo dot pugmarks dot com
2004-06-25 22:02 ` geoffk at gcc dot gnu dot org
2005-09-22 10:54 ` a dot darovskikh at compassplus dot ru
2005-09-23 12:45 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).