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

--- Comment #14 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #10)
> I think this is at most a C++ std library QOI issue - IIRC you have to use a
> different allocator for types requiring bigger alignment than any of the
> standard types.  That is simply using std::vector<T> for such types doesn't
> guarantee proper alignment as memory is obtained via std::new.

No, that's not true since C++17. std::vector<T> uses std::allocator<T> which
looks at the alignment requirement for T and uses aligned-new if needed.

If the compiler is reporting the wrong alignment requirement for the type, the
library can't do much about that.

Reply via email to