[Bug c++/14173] [3.4/3.5 Regression] -fpack-struct crashes on hello_world.cpp
giovannibajo at libero dot it
gcc-bugzilla@gcc.gnu.org
Fri Feb 20 02:41:00 GMT 2004
------- 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
More information about the Gcc-bugs
mailing list