Skip to content

#1634 testdebugallocator_fail1 does not build with gcc-4.9

Metadata

Property Value
Reported by Carsten Gräser (graeser@math.fu-berlin.de)
Reported at May 5, 2015 09:17
Type Bug Report
Version Git (pre2.4) [cmake]
Operating System Linux 64bit
Last edited by Carsten Gräser (graeser@math.fu-berlin.de)
Last edited at May 5, 2015 10:34

Description

The failure happens on a 64bit ubuntu-15.04 with packaged gcc-4.9 and a debug build. The reported error is on the exception specifier:

In file included from /home/graeser/dune_testing/dune-common/dune/common/test/testdebugallocator.cc:10:0: /home/graeser/dune_testing/dune-common/dune/common/debugallocator.hh: In function ‘void* operator new(size_t)’: /home/graeser/dune_testing/dune-common/dune/common/debugallocator.hh:297:54: error: declaration of ‘void* operator new(size_t) throw (std::bad_alloc)’ has a different exception specifier void * operator new(size_t size) throw(std::bad_alloc) ^ In file included from /usr/include/c++/4.9/ext/new_allocator.h:33:0, from /usr/include/x86_64-linux-gnu/c++/4.9/bits/c++allocator.h:33, from /usr/include/c++/4.9/bits/allocator.h:46, from /usr/include/c++/4.9/vector:61, from /home/graeser/dune_testing/dune-common/dune/common/debugallocator.hh:9, from /home/graeser/dune_testing/dune-common/dune/common/test/testdebugallocator.cc:10: /usr/include/c++/4.9/new:128:7: error: from previous declaration ‘void* operator new(std::size_t)’ void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) ^