[GRASS-dev] [GRASS GIS] #2871: Fails to build with GCC 6: declaration of ... has a different exception specifier
GRASS GIS
trac at osgeo.org
Wed Jan 20 12:29:01 PST 2016
#2871: Fails to build with GCC 6: declaration of ... has a different exception
specifier
-----------------------+-------------------------
Reporter: sebastic | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.4
Component: Compiling | Version: 7.0.2
Keywords: | CPU: Unspecified
Platform: Linux |
-----------------------+-------------------------
As reported by Martin Michlmayr in [https://bugs.debian.org/811886 Debian
Bug #811886]:
> This package fails to build with GCC 6. GCC 6 has not been released
yet, but it's expected that GCC 6 will become the default compiler for
stretch.
>
> Note that only the first error is reported; there might be more. You
can find a snapshot of GCC 6 in experimental. To build with GCC 6, you
can set CC=gcc-6 CXX=g++-6 explicitly.
>
> You may be able to find out more about this issue at
> https://gcc.gnu.org/gcc-6/changes.html
> {{{
> sbuild (Debian sbuild) 0.67.0 (26 Dec 2015) on dl580gen9-02.hlinux
> ...
> c++ -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong
-Wformat -Werror=format-security -fPIC -I/<<PKGBUILDDIR>>/dist.x86_64-pc-
linux-gnu/include -I/<<PKGBUILDDIR>>/dist.x86_64-pc-linux-gnu/include
-DPACKAGE=\""grasslibs"\" -I/<<PKGBUILDDIR>>/dist.x86_64-pc-linux-
gnu/include -I/<<PKGBUILDDIR>>/dist.x86_64-pc-linux-gnu/include
-DRELDIR=\"lib/iostream\" -o OBJ.x86_64-pc-linux-gnu/rtimer.o -c
rtimer.cpp
> mm.cpp: In function 'void* operator new [](size_t)':
> mm.cpp:279:7: error: declaration of 'void* operator new [](size_t) throw
(std::bad_alloc)' has a different exception specifier
> void* operator new[] (size_t sz) throw(std::bad_alloc) {
> ^~~~~~~~
>
> In file included from mm.cpp:49:0:
> /<<PKGBUILDDIR>>/dist.x86_64-pc-linux-
gnu/include/grass/iostream/mm.h:132:17: note: from previous declaration
'void* operator new [](std::size_t)'
> friend void * operator new[](size_t) throw(std::bad_alloc);
> ^~~~~~~~
>
> mm.cpp: In function 'void* operator new(size_t)':
> mm.cpp:330:7: error: declaration of 'void* operator new(size_t) throw
(std::bad_alloc)' has a different exception specifier
> void* operator new (size_t sz) throw(std::bad_alloc) {
> ^~~~~~~~
>
> In file included from mm.cpp:49:0:
> /<<PKGBUILDDIR>>/dist.x86_64-pc-linux-
gnu/include/grass/iostream/mm.h:131:17: note: from previous declaration
'void* operator new(std::size_t)'
> friend void * operator new(size_t) throw(std::bad_alloc);
> ^~~~~~~~
>
> ../../include/Make/Compile.make:35: recipe for target 'OBJ.x86_64-pc-
linux-gnu/mm.o' failed
> }}}
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2871>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list