Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-67875

WIN64: 'result of '(7 << 29)' requires 33 bits to represent, but 'int' only has 32 bits [-Werror=shift-overflow=]' error for builds using mingw-w64

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.12
    • Qt3D
    • None

    Description

      Hello, everyone,

       

      For builds using mingw-w64 got errors:

      mingw32-make[4]: Entering directory 'C:/libQT-5.12-dev/build/qt3d/src/render'
      g++ -c -fno-keep-inline-dllexport -msse2 -mstackrealign -g -Og -std=c++1y -fno-exceptions -Wall -W -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -DUNICODE -D_UNICODE -DWIN32 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_FOREACH -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_3DRENDER_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_NO_EXCEPTIONS -DQT_FORCE_ASSERTS -DQT_3DCORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_OPENGLEXTENSIONS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -Wall -Wextra -Werror -Woverloaded-virtual -Wshadow -Wundef -Wfloat-equal -Wnon-virtual-dtor -Wpointer-arith -Wformat-security -Wno-long-long -Wno-variadic-macros -pedantic-errors -Wchar-subscripts -Wold-style-cast -Wcast-align -Wdouble-promotion -Wfloat-conversion -Wzero-as-null-pointer-constant -std=c++0x -I. -Ibackend -Igeometry -Iframegraph -Ifrontend -Ijobs -Ilights -Imaterialsystem -Irenderstates -Iio -Ipicking -Iraycasting -Iservices -Itexture -Irenderers\opengl\renderer -Irenderers\opengl\jobs -Irenderers\opengl\io -Irenderers\opengl\textures -Irenderers\opengl\graphicshelpers -Irenderers\opengl\renderstates -I..\..\include -I..\..\include\Qt3DRender -I..\..\include\Qt3DRender\5.12.0 -I..\..\include\Qt3DRender\5.12.0\Qt3DRender -Itmp -I..\..\include\Qt3DCore\5.12.0 -I..\..\include\Qt3DCore\5.12.0\Qt3DCore -IC:\libQT-5.12-dev\build\qtbase\include\QtGui\5.12.0 -IC:\libQT-5.12-dev\build\qtbase\include\QtGui\5.12.0\QtGui -IC:\libQT-5.12-dev\build\qtbase\include\QtCore\5.12.0 -IC:\libQT-5.12-dev\build\qtbase\include\QtCore\5.12.0\QtCore -I..\..\include\Qt3DCore -IC:\libQT-5.12-dev\build\qtbase\include -IC:\libQT-5.12-dev\build\qtbase\include\QtGui -IC:\libQT-5.12-dev\build\qtbase\include\QtANGLE -IC:\libQT-5.12-dev\build\qtbase\include\QtNetwork -IC:\libQT-5.12-dev\build\qtbase\include\QtCore -IC:\libQT-5.12-dev\build\qtbase\include\QtOpenGLExtensions -IC:\libQT-5.12-dev\build\qtbase\include\QtConcurrent -I.moc\debug -I"C:\Program Files (x86)\VulkanSDK\include" -I"C:\Program Files (x86)\VulkanSDK\include" -IC:\libQT-5.12-dev\build\qtbase\mkspecs\win32-g++  -DQT_NO_CAST_TO_ASCII=1 -DQT_NO_CAST_FROM_ASCII=1 -UQT_RESTRICTED_CAST_FROM_ASCII -DQT_STRICT_ITERATORS -DQT_NO_URL_CAST_FROM_STRING=1 -DQT_NO_CAST_FROM_BYTEARRAY=1 -DQT_NO_KEYWORDS=1 -DQT_USE_QSTRINGBUILDER -DQT_USE_FAST_OPERATOR_PLUS -Dsignals=int -Dslots=int -Demit=public: -Dforeach=public: -Dforever=public: -xc++ framegraph\qblitframebuffer.h -o .obj\debug\header_qblitframebuffer.o
      In file included from C:\libQT-5.12-dev\build\qtbase\include/QtCore/qdebug.h:1:0,
                       from C:\libQT-5.12-dev\build\qtbase\include/QtCore/QDebug:1,
                       from ..\..\include/Qt3DCore/../../src/core/nodes/qnodeid.h:44,
                       from ..\..\include/Qt3DCore/qnodeid.h:1,
                       from ..\..\include/Qt3DCore/../../src/core/changes/qscenechange.h:43,
                       from ..\..\include/Qt3DCore/qscenechange.h:1,
                       from ..\..\include/Qt3DCore/../../src/core/changes/qnodecreatedchange.h:40,
                       from ..\..\include/Qt3DCore/qnodecreatedchange.h:1,
                       from ..\..\include/Qt3DCore/../../src/core/nodes/qnode.h:43,
                       from ..\..\include/Qt3DCore/qnode.h:1,
                       from ..\..\include/Qt3DRender/../../src/render/framegraph/qframegraphnode.h:43,
                       from ..\..\include/Qt3DRender/qframegraphnode.h:1,
                       from framegraph\qblitframebuffer.h:43:
      C:/libQT-5.12-dev/build/qtbase/src/corelib/io/qdebug.h: In member function 'void QDebug::Stream::setVerbosity(int)':
      C:/libQT-5.12-dev/build/qtbase/src/corelib/io/qdebug.h:99:42: error: result of '(7 << 29)' requires 33 bits to represent, but 'int' only has 32 bits [-Werror=shift-overflow=]
                       flags &= ~(VerbosityMask << VerbosityShift);
                                  ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
      cc1plus.exe: all warnings being treated as errors
      mingw32-make[4]: *** [Makefile.Debug:1710: .obj/debug/header_qblitframebuffer.o] Error 1
      mingw32-make[4]: Leaving directory 'C:/libQT-5.12-dev/build/qt3d/src/render'
      mingw32-make[3]: *** [Makefile:36: debug] Error 2
      mingw32-make[3]: Leaving directory 'C:/libQT-5.12-dev/build/qt3d/src/render'
      mingw32-make[2]: *** [Makefile:164: sub-render-make_first] Error 2
      mingw32-make[2]: Leaving directory 'C:/libQT-5.12-dev/build/qt3d/src'
      mingw32-make[1]: *** [Makefile:44: sub-src-make_first] Error 2
      mingw32-make[1]: Leaving directory 'C:/libQT-5.12-dev/build/qt3d'
      mingw32-make: *** [Makefile:596: module-qt3d-make_first] Error 2
      

       

      Reproduced for:

      • builds using mingw-w64,

      not reproduced for:

       

      Best,

      Alexander

       

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-67875
          # Subject Branch Project Status CR V

          Activity

            People

              seanharmer Sean Harmer
              sav sav
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes