------- Additional Comments From ncm-nospam at cantrip dot org 2005-01-21 15:37 ------- Hmm, it's a little more complicated than I said, although it might be academic. There's an implicit assumption in the code that any type on which basic_string<> might be instantiated has no stricter alignment than _Rep itself. But that's a different bug. Probably the right way to fix it is to replace the first member of _Rep with an anonymous union:
size_type _M_length; becomes union { size_type _M_length; _Some_big_aligned_type _M_alignment_dummy; }; I don't know if gcc supplies a built-in typedef for that. Without checking, I think tr1 must do. I believe this can also be done without breaking ABI on any actual target. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19495