This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR fortran/51727: make module files reproducible, question on C++ in gcc
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- Cc: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>, Fortran List <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 14 Oct 2012 23:44:55 +0200
- Subject: Re: PR fortran/51727: make module files reproducible, question on C++ in gcc
- References: <50796BF5.4060100@physik.uni-muenchen.de> <CAO9iq9FU6wu8n5kYN=36Z_JVO=guVb=XxGR_NSm5H81nVHMg6Q@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Oct 15, 2012 at 12:35:27AM +0300, Janne Blomqvist wrote:
> On Sat, Oct 13, 2012 at 4:26 PM, Tobias Schlüter
> > I'm putting forward two patches. One uses a C++ map to very concisely build
> > up and handle the ordered list of symbols. This has three problems:
> > 1) gfortran maintainers may not want C++isms (even though in this case
> > it's very localized, and in my opinion very transparent), and
Even if you prefer a C++isms, why don't you go for "hash-table.h"?
std::map at least with the default allocator will just crash the compiler
if malloc returns NULL (remember that we build with -fno-exceptions),
while when you use hash-table.h (or hashtab.h) you get proper OOM diagnostics.
Jakub