This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/42158] structure alignment for derived class is wrong in some cases



------- Comment #5 from info at hex-rays dot com  2009-11-24 11:02 -------
What is embarrassing is that the compiler does not issue at least a warning and
changes the alignment depending on some very obscure factor. I understand why
it happens but really do not like it.

If I add one more line to myadd.cpp, after the include lines:

std::set<int> my_intset2;

the compiler will generate another copy of the set<int> ctor, but it will be
different from the one in gcc_align_bug.o

You could at least check the both ctors are identical at the linking time and
issue a warning. On the other hand, now I realized that such a bug should have
been filled very long ago...


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]