This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14173] [3.4/3.5 Regression] -fpack-struct crashes on hello_world.cpp
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Feb 2004 02:41:11 -0000
- Subject: [Bug c++/14173] [3.4/3.5 Regression] -fpack-struct crashes on hello_world.cpp
- References: <20040217111611.14173.thome@lix.polytechnique.fr>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From giovannibajo at libero dot it 2004-02-20 02:41 -------
The segfault looks like a memory corruption problem (or my GDB is nuts), so
I'll leave it to someone else.
-fpack-struct is not compatible with libstdc++-v3. For once, you should have
compiled the library itself with -fpack-struct, otherwise you are going to get
segfaults at runtime due to different object layout.
A good solution could be to make -fpack-struct affects only user-defined
structures. This could be a check for structs defined in system headers or in
namespace std (which is reserved anyway). I will submit a patch to change the
behaviour of -fpack-struct once the segfault is solved.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |giovannibajo at libero dot
| |it
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14173