This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: using C++ STL containers in GCC/gfortran source code
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Pedro Alves <palves at redhat dot com>
- Cc: Janus Weil <janus at gcc dot gnu dot org>, "N.M. Maclaren" <nmm1 at cam dot ac dot uk>, gcc mailing list <gcc at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>
- Date: Sat, 17 Dec 2016 11:17:25 -0500
- Subject: Re: using C++ STL containers in GCC/gfortran source code
- Authentication-results: sourceware.org; auth=none
- References: <CAKwh3qgUN=mTFPg6Ew6Yk9RXgS3CttE7O3cGMQRcLKNqUOjBng@mail.gmail.com> <Prayer.1.3.5.1612161716380.29840@hermes-2.csi.cam.ac.uk> <CAKwh3qhj-y5U9RrJ+nP45fGjRL2JbEKGKcVw4nsXMp-=h8jq-Q@mail.gmail.com> <1b7f3420-0496-9211-3c74-42a7d4a52525@redhat.com> <CAKwh3qiAGVjGVg0FKakEFmdmdJjPw=KQ7j0jYbB0qp2SPN__Aw@mail.gmail.com> <e7d08a00-75c0-4ca5-804c-e8b9648f5beb@redhat.com>
Pedro Alves <palves@redhat.com> writes:
> [...]
> malloc will fail, new will throw bad_alloc, and GCC will abort and
> maybe generate a core dump, instead of gracefully printing
> something like:
> cc1: out of memory allocating NNNNNNNN bytes ...
> and existing with error status.
Consider having the main() function catch bad_alloc etc. and print
prettier error messages than the builtin uncaught-exception aborter?
- FChE