This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/56126] -fno-exceptions should activate -fcheck-new or issue diagnostic for all new operators without throw()
- From: "bruck.michael at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 04 Jan 2015 01:54:13 +0000
- Subject: [Bug c++/56126] -fno-exceptions should activate -fcheck-new or issue diagnostic for all new operators without throw()
- Auto-submitted: auto-generated
- References: <bug-56126-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56126
--- Comment #5 from Michael Bruck <bruck.michael at googlemail dot com> ---
@Olaf
"5.3.4 New
13 [Note: unless an allocation function is declared with a non-throwing
exception-specification (15.4), it indicates failure to allocate storage by
throwing a std::bad_alloc exception (Clause 15, 18.6.2.1); it returns a
non-null pointer otherwise. If the allocation function is declared with a
non-throwing exception-specification, it returns null to indicate failure to
allocate storage and a non-null pointer otherwise. âend note] If the allocation
function returns null, initialization shall not be done, the deallocation
function shall not be called, and the value of the new-expression shall be
null."