This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/23383] builtin array operator new is not marked with malloc attribute
- From: "davidxl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jun 2008 16:48:13 -0000
- Subject: [Bug c++/23383] builtin array operator new is not marked with malloc attribute
- References: <bug-23383-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #13 from davidxl at gcc dot gnu dot org 2008-06-04 16:48 -------
(In reply to comment #12)
> Interesting things start to happen once you inline allocator functions as well.
> See PR29286 and PR33407 which we still don't handle 100% correct.
>
I browsed through the two bugs -- it seems that compiler should get this right
regardless -- local pointer analysis should detect the must aliasing and should
overrule the type based aliasing decision when the placement new is inlined. If
not inlined, compiler should know the exact semantics of placement new (return
== arg), or treat it conservatively.
David
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23383