This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/29286] [4.2 Regression] placement new does not provide required side-effects
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Sep 2006 15:49:15 -0000
- Subject: [Bug libstdc++/29286] [4.2 Regression] placement new does not provide required side-effects
- References: <bug-29286-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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