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 c++/60202] < 128 alignment for vector<T> data where T has a member with alignas(128)


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 ***

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