Control: tags -1 + patch

> 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.

> > common/mem.cc: In function 'void* operator new(size_t)':
> > common/mem.cc:246:1: error: declaration of 'void* operator new(size_t) 
> > throw (std::bad_alloc)' has a different exception specifier
> >  operator new(size_t nbytes)
> >  ^~~~~~~~
> > 
> > In file included from common/mem.cc:26:0:
> > ./common/mem.h:134:7: note: from previous declaration 'void* operator 
> > new(std::size_t)'
> >  void *operator new(size_t nbytes) THROW_BAD_ALLOC;
> >        ^~~~~~~~
> > 
> > common/mem.cc: In function 'void* operator new [](size_t)':
> > common/mem.cc:266:1: error: declaration of 'void* operator new [](size_t) 
> > throw (std::bad_alloc)' has a different exception specifier
> >  operator new[](size_t nbytes)
> >  ^~~~~~~~
> > 
> > In file included from common/mem.cc:26:0:
> > ./common/mem.h:141:7: note: from previous declaration 'void* operator new 
> > [](std::size_t)'
> >  void *operator new[](size_t nbytes) THROW_BAD_ALLOC;
> >        ^~~~~~~~
> > 
> > Makefile:9040: recipe for target 'common/mem.o' failed
> > make[1]: *** [common/mem.o] Error 1

The default for GCC6 is -std=gnu++14.

I attached a patch.


Attachment: fix-build-gcc6.diff
Description: Binary data

Reply via email to