This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/60202] < 128 alignment for vector<T> data where T has a member with alignas(128)
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 31 Jan 2016 00:11:05 +0000
- Subject: [Bug c++/60202] < 128 alignment for vector<T> data where T has a member with alignas(128)
- Auto-submitted: auto-generated
- References: <bug-60202-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60202
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |msebor at gcc dot gnu.org
Resolution|--- |DUPLICATE
--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
I believe this can be classified as a duplicate of bug 36159, which asks to add
a warning pointing out this loophole in C++.
The underlying problem is that standard containers like vector are required to
use the standard allocator which in turn is required to use the default
operator new to allocate memory, which provides no interface to specify the
alignment of the type being allocated.
If the C++ proposal for the Dynamic Memory Allocation For Over-aligned Data is
accepted and implemented then it will become possible to use standard
containers with overaligned types:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0035r0.html
*** This bug has been marked as a duplicate of bug 36159 ***