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 middle-end/71002] [6/7 Regression] -fstrict-aliasing breaks Boost's short string optimization implementation


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71002

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
The issue is similar to that in PR70054 in that for example string::swap_data
copy-initializes repr_t which has the long_raw_t member that is not of the
type that it is modified as (for some odd reason).

(just from looking at the source now, not analyzing what GCC does to it)

Why doesn't boost just use

union repr_t
{
  long_t      l;
  short_t     s;

...

?

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