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: "olafvdspek at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 04 Jan 2015 15:50:28 +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 #8 from Olaf van der Spek <olafvdspek at gmail dot com> ---
(In reply to Michael Bruck from comment #0)
> In code compiled with -fno-exceptions nothing can be thrown, consequently
> all new operators should imply throw() or a warning/error should occur when
> new operators without throw() are used.
No, as you could (should?) abort/terminate instead of returning NULL.