This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15795] No way to teach operator new anything about alignment requirements
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jun 2004 17:43:09 -0000
- Subject: [Bug c++/15795] No way to teach operator new anything about alignment requirements
- References: <20040603143635.15795.ma1flfs@bath.ac.uk>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-06-08 17:43 -------
I think their argument is that the compiler knows about the alignment
of a type and should make use of this. Now, operator new is
in libstdc++ and presumably calls malloc directly, so that's a little
more complicated (operator new only gets passed a size, no alignment,
so we can't play games with __alignof__), but there may still be ways.
My feeling is that glibc should fix this, not the compiler. For the moment
we seem to be at an impasse, though :-(
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15795