------- Comment #6 from rguenth at gcc dot gnu dot org 2007-03-21 09:58 ------- This is related to PR29286, the C++ aliasing rules are disputedly different from the C ones. So at the moment you cannot implement an allocator in C++ (and in C in general). That said, the proper way is to start a new object lifetime using placement new.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31289