This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50594] Option -fwhole-program discards replaced new operator for std::string
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 03 Oct 2011 13:43:21 +0000
- Subject: [Bug c++/50594] Option -fwhole-program discards replaced new operator for std::string
- Auto-submitted: auto-generated
- References: <bug-50594-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50594
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-10-03 13:43:21 UTC ---
[basic.stc.dynamic.allocation] p1
"a program is ill-formed if an allocation function is declared in a namespace
scope other than global scope or declared static in global scope."
So using -fwhole-program and not making replacement functions
externally-visible produces an ill-formed program (which G++ should probably
reject)