using C++ STL containers in GCC/gfortran source code

Frank Ch. Eigler fche@redhat.com
Sat Dec 17 16:17:00 GMT 2016


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



More information about the Fortran mailing list