This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/33896] New: std::tr1::array has too-conservative alignment on _M_instance
- From: "atgraham at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Oct 2007 16:42:15 -0000
- Subject: [Bug libstdc++/33896] New: std::tr1::array has too-conservative alignment on _M_instance
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
std::tr1::array's only data member, _M_instance, has
__attribute__((__aligned__)) which means that it potentially takes more space
in memory than is required by the size and alignment of type _Tp. This makes
tr1::array somewhat less attractive than C-style arrays, especially on
low-memory systems, since there's an unnecessary hidden cost.
Paolo mentioned that this was originally done to play it safe with some
extensions, but that those extensions could be fixed. I don't know which
extensions he was referring to.
--
Summary: std::tr1::array has too-conservative alignment on
_M_instance
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: atgraham at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33896