To be honest, I don't know what some of these bug fields mean (triplet??), so
if you need more info please let me know.

I am trying to use precompiled headers to speed up my development time when
using wx-widgets. All of my source files crash when attempting to compile any
of them

Header file
---------------
$cat wxprec-proxy.h
#ifndef WXPREC_PROXY_H
#define WXPREC_PROXY_H

//This file is a workaround to a bug as
//described in GCC bugzilla (id 13675)
//BUG: "#including a precompiled header more than once in the same unit fails"
#include "wxprec.h"


#endif

---------------
$cat wxprec.h
#include <wx/wx.h>
#include <wx/image.h>

---------------


The segfault happens *every time* I use precompiled headers (I haven't tested
between source files yet)

wx-config output:

$wx-config --cflags
-I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread

uname output:
Linux thebox 2.6.25.3-18.fc9.i686 #1 SMP Tue May 13 05:38:53 EDT 2008 i686
athlon i386 GNU/Linux

wxsimple header:
$ cat wxsimple.h 
#infdef WXSIMPLE_H
#define WXSIMPLE_H

#include "wxprec-proxy.h"

#endif

wxsimple source:

$ cat wxsimple.cpp 

#include "wxsimple.h"




gcc output:

gcc -c -Wall --ansi -Wno-deprecated --verbose -save-temps -g -DDEBUG 
`wx-config --cflags` -o wxsimple.o wxsimple.cpp 
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-cpu=generic --build=i386-redhat-linux
Thread model: posix
gcc version 4.3.0 20080428 (Red Hat 4.3.0-8) (GCC) 
COLLECT_GCC_OPTIONS='-c' '-Wall' '-ansi' '-Wno-deprecated' '-v' '-save-temps'
'-g' '-DDEBUG' '-I/usr/lib/wx/include/gtk2-unicode-release-2.8'
'-I/usr/include/wx-2.8' '-D_FILE_OFFSET_BITS=64' '-D_LARGE_FILES' '-D__WXGTK__'
'-pthread' '-o' 'wxsimple.o' '-mtune=generic'
 /usr/libexec/gcc/i386-redhat-linux/4.3.0/cc1plus -E -quiet -v
-I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8
-D_GNU_SOURCE -D_REENTRANT -DDEBUG -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
-D__WXGTK__ wxsimple.cpp -mtune=generic -ansi -Wall -Wno-deprecated
-fworking-directory -fpch-preprocess -o wxsimple.ii
ignoring nonexistent directory
"/usr/lib/gcc/i386-redhat-linux/4.3.0/include-fixed"
ignoring nonexistent directory
"/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../i386-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/wx/include/gtk2-unicode-release-2.8
 /usr/include/wx-2.8
 /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0

/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/i386-redhat-linux
 /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/backward
 /usr/local/include
 /usr/lib/gcc/i386-redhat-linux/4.3.0/include
 /usr/include
End of search list.
In file included from wxsimple.cpp:2:
wxsimple.h:1:2: error: invalid preprocessing directive #infdef
wxprec-proxy.h:13:2: error: #endif without #if
In file included from <built-in>:0:
<built-in>:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.


-- 
           Summary: Segfault when using precompiled headers
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mycae at yahoo dot com


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

Reply via email to