Skip to content

fix build on gcc 6.x, use -Wno-maybe-uninitialized for alib2std

Jakub Jirůtka requested to merge (removed):no-maybe-uninitialized into master

Build fails on gcc 6.3.0:

g++ -pipe -std=c++11 -O3 -DNDEBUG -DRELEASE -c -Wall -pedantic -Wextra \
  -Werror -Wshadow -Wpointer-arith -Wcast-qual -Wdelete-non-virtual-dtor \
  -Wredundant-decls -fPIC -Ialib2std/src \
  alib2std/test-src/extensions/VariantTest.cpp \
  -o alib2std/test-obj-release/extensions/VariantTest.o
alib2std/test-src/extensions/VariantTest.cpp: In member function 'void VariantTest::testVariantVoid()':
alib2std/test-src/extensions/VariantTest.cpp:114:26: error: '*((void*)& v +8)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  std::variant<void, int> v;
cc1plus: all warnings being treated as errors

It'd be better to actually fix this issue though...

Merge request reports