This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/65122] std::vector doesn't honor element alignment
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 25 Sep 2016 08:36:35 +0000
- Subject: [Bug libstdc++/65122] std::vector doesn't honor element alignment
- Auto-submitted: auto-generated
- References: <bug-65122-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65122
--- Comment #19 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #17)
> I think this is fixed for GCC 7 with -std=c++17 support.
No, it isn't. new T[10] will give suitably aligned memory, but not
std::allocator<T>. Only the core part of alignment support was added in C++17,
we are expecting a corresponding library part in C++20. On the other hand,
providing it as an extension in C++17-mode (gnu++17?) might be ok (requires a
discussion).