Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.9.3, 5.10.0
-
Fedora fc27, gcc 7.2.1, Qt v5.10.0 from git, Qt v5.9.3 from git.
configuration: -developer-build -c++std c++11 -nomake tests -nomake examples -commercial -confirm-license
Description
After upgrading to Fedora Core 27, building Qt 5.10 or Qt 5.9.3 from git fails, when compiling with GCC version 7.2.1. with c++11 standard (c++1z does not suffer this, but stops building on other bug not reported here).
The new compiler seems to be particularly interested that integer shifting does not overflow:
[jani@jani-t470p qt5]$ make cd qtbase/ && ( test -e Makefile || /home/jani/Qt_5.10_src/qt5/qtbase/bin/qmake -o Makefile /home/jani/Qt_5.10_src/qt5/qtbase/qtbase.pro ) && make -f Makefile make[1]: Entering directory '/home/jani/Qt_5.10_src/qt5/qtbase' cd src/ && ( test -e Makefile || /home/jani/Qt_5.10_src/qt5/qtbase/bin/qmake -o Makefile /home/jani/Qt_5.10_src/qt5/qtbase/src/src.pro ) && make -f Makefile make[2]: Entering directory '/home/jani/Qt_5.10_src/qt5/qtbase/src' cd tools/bootstrap/ && ( test -e Makefile || /home/jani/Qt_5.10_src/qt5/qtbase/bin/qmake -o Makefile /home/jani/Qt_5.10_src/qt5/qtbase/src/tools/bootstrap/bootstrap.pro ) && make -f Makefile make[3]: Entering directory '/home/jani/Qt_5.10_src/qt5/qtbase/src/tools/bootstrap' g++ -c -pipe -ffunction-sections -O2 -fPIC -std=c++11 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Werror -Wno-error=cpp -Wno-error=deprecated-declarations -Wno-error=strict-overflow -Wno-error=implicit-fallthrough -D_REENTRANT -DQT_VERSION_STR='"5.10.0"' -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=10 -DQT_VERSION_PATCH=0 -DQT_BOOTSTRAPPED -DQT_NO_CAST_TO_ASCII -DQT_NO_FOREACH -DQT_NO_CAST_FROM_ASCII -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_BOOTSTRAP_LIB -DQT_BUILDING_QT -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../../include -I../../../include/QtCore -I../../../include/QtCore/5.10.0 -I../../../include/QtCore/5.10.0/QtCore -I../../../include/QtXml -I../../../include/QtXml/5.10.0 -I../../../include/QtXml/5.10.0/QtXml -I../../../mkspecs/linux-g++ -o .obj/qglobal.o ../../corelib/global/qglobal.cpp In file included from ../../../include/QtCore/5.10.0/QtCore/private/../../../../../src/corelib/tools/qlocale_tools_p.h:54:0, from ../../../include/QtCore/5.10.0/QtCore/private/qlocale_tools_p.h:1, from ../../corelib/global/qglobal.cpp:49: ../../../include/QtCore/5.10.0/QtCore/private/../../../../../src/corelib/tools/qlocale_p.h:422:28: error: result of ‘(1 << 31)’ requires 33 bits to represent, but ‘int’ only has 32 bits [-Werror=shift-overflow=] enum \{ AsciiSpaceMask = (1 << (' ' - 1)) | ~~^~~~~~~~~~~~ cc1plus: all warnings being treated as errors make[3]: *** [Makefile:1086: .obj/qglobal.o] Error 1 make[3]: Leaving directory '/home/jani/Qt_5.10_src/qt5/qtbase/src/tools/bootstrap' make[2]: *** [Makefile:72: sub-bootstrap-make_first] Error 2 make[2]: Leaving directory '/home/jani/Qt_5.10_src/qt5/qtbase/src' make[1]: *** [Makefile:49: sub-src-make_first] Error 2 make[1]: Leaving directory '/home/jani/Qt_5.10_src/qt5/qtbase' make: *** [Makefile:91: module-qtbase-make_first] Error 2
and similarly with 5.9.3.