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: Fri, 09 Jan 2015 08:18:03 +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 #14 from Michael Bruck <bruck.michael at googlemail dot com> ---
(In reply to Olaf van der Spek from comment #12)
> > Allocation failure is a
> > simple error and should not kill your program.
>
> It's far from simple to handle properly and to do better then abort.
In systems that use different types of allocators for different purposes it can
be a fairly common case.
> >> BTW, what's your use case? Do you really want to check NULL on every
> >> call to new?
> >
> > With -fno-exceptions you have to check all functions for errors, including
> > allocation.
>
> What's your use case?
Memory constrained systems