This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/56126] -fno-exceptions should activate -fcheck-new or issue diagnostic for all new operators without throw()


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."

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]