------- Comment #6 from pinskia at gcc dot gnu dot org 2006-09-29 15:49 ------- Actually I think it should be: inline void* operator new(std::size_t, void* __p) throw() { void *p1; __asm__ ("" : "=r"(p1): "0"(__p): "memory"); return __p; }
Which is less pessimize. Note the reason why you need this memory barrier is because the C++ standard says inplacement news change the dynamic type. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pinskia at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2006-09-29 15:49:15 date| | Target Milestone|--- |4.2.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286