ToadKing/wii-u-gc-adapter

error: moving a local object in a return statement prevents copy elision

Closed this issue · 1 comments

Fails to build on Arch Linux, here's the build log:

GCC 9.1.0 detected
Compiling src/mame/drivers/alesis.cpp...
In file included from ../../../../../src/emu/emu.h:104:
../../../../../src/emu/devcb.h: In instantiation of 'devcb_read<Result, DefaultMask>::func_t devcb_read<Result, DefaultMask>::creator_impl<T>::create() [with T = devcb_read<unsigned char>::functoid_builder<devcb_read<Result, DefaultMask>::binder::set_constant(Result) [with Result = unsigned char; typename std::make_unsigned<_Tp>::type DefaultMask = 255]::<lambda()> >; Result = unsigned char; typename std::make_unsigned<_Tp>::type DefaultMask = 255; devcb_read<Result, DefaultMask>::func_t = std::function<unsigned char(address_space&, unsigned int, unsigned char)>; typename std::make_unsigned<_Tp>::type = unsigned char]':
../../../../../src/emu/devcb.h:497:18:   required from here
../../../../../src/emu/devcb.h:501:27: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]
  501 |    return std::move(result);
      |                           ^
../../../../../src/emu/devcb.h:501:27: note: remove 'std::move' call
cc1plus: all warnings being treated as errors
make[2]: *** [alesis.make:326: ../../../../linux_gcc/obj/x64/Release/src/mame/drivers/alesis.o] Error 1
make[1]: *** [Makefile:427: alesis] Error 2
make: *** [makefile:1288: linux_x64] Error 2

Nevermind, it compiled successfully after installing from AUR.