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