http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45822
Summary: [4.6-regression] Qt 4.7.0 declarative build fails Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: vanboxem.ru...@gmail.com gcc -v: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=m:/development/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/4.6.0/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: ../../src/gcc/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/mingw64 --enable-lto --disable-multilib --enable-shared --enable-stage1-languages=c,lto --enable-languages=c,c++,lto --with-libiconv-prefix=/home/Ruben/mingw64/build64/gcc-libs --with-libexpat-prefix=/home/Ruben/mingw64/build64/gcc-libs --with-gmp=/home/Ruben/mingw64/build64/gcc-libs --with-mpfr=/home/Ruben/mingw64/build64/gcc-libs --with-mpc=/home/Ruben/mingw64/build64/gcc-libs --disable-win32-registry --enable-fully-dynamic-string --enable-checking=release --disable-werror --disable-nls CFLAGS='-O2 -mtune=core2 -fomit-frame-pointer -momit-leaf-frame-pointer' LFLAGS=-no-undefined BOOT_CFLAGS= 'BOOT_LFLAGS=-flto -fwhopr=2' TARGET_CFLAGS= 'TARGET_LFLAGS=-flto -fwhopr=2' Thread model: win32 gcc version 4.6.0 20100918 (experimental) (GCC) This is built from a snapshot and patched for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45580 Command used to compile the file and its output: g++ -c -O2 -Wall -frtti -fexceptions -mthreads -DQT_SHARED -DQT_THREAD_SUPPORT -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_BUILD_DECLARATIVE_LIB -DQT_NO_URL_CAST_FROM_STRING -DQT_MAKEDLL -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -D_USE_MATH_DEFINES -DQT_DLL -DQT_NO_DEBUG -DQT_SCRIPT_LIB -DQT_SVG_LIB -DQT_SQL_LIB -DQT_XMLPATTERNS_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I"..\..\include\QtCore" -I"..\..\include\QtNetwork" -I"..\..\include\QtGui" -I"..\..\include\QtOpenGL" -I"..\..\include\QtXmlPatterns" -I"..\..\include\QtSql" -I"..\..\include\QtSvg" -I"..\..\include\QtScript" -I"..\..\include" -I"..\..\include\QtDeclarative" -I"tmp\rcc\release_shared" -I"tmp" -I"m:\Development\Source\qt\src\declarative\util" -I"m:\Development\Source\qt\src\declarative\graphicsitems" -I"m:\Development\Source\qt\src\declarative\qml" -I"m:\Development\Source\qt\src\declarative\qml\parser" -I"m:\Development\Source\qt\src\declarative\qml\rewriter" -I"m:\Development\Source\qt\src\declarative\debugger" -I"..\..\include\ActiveQt" -I"tmp\moc\release_shared" -I"m:\Development\Source\qt\src\declarative" -I"." -I"..\..\mkspecs\win32-g++" -o tmp\obj\release_shared\qdeclarativeitemsmodule.o m:\Development\Source\qt\src\declarative\graphicsitems\qdeclarativeitemsmodule.cpp In file included from ..\..\include/QtDeclarative/qdeclarativeprivate.h:1:0, from ..\..\include\QtDeclarative/../../../../Source/qt/src/declarative/qml/qdeclarative.h:45, from ..\..\include\QtDeclarative/qdeclarative.h:1, from ..\..\include\QtDeclarative/private/../../../../../Source/qt/src/declarative/graphicsitems/qdeclarativeitemsmodule_p.h:45, from ..\..\include\QtDeclarative/private/qdeclarativeitemsmodule_p.h:1, from m:\Development\Source\qt\src\declarative\graphicsitems\qdeclarativeitemsmodule.cpp:42: ..\..\include/QtDeclarative/../../../../Source/qt/src/declarative/qml/qdeclarativeprivate.h: In constructor 'QDeclarativePrivate::QDeclarativeElement<QGraphicsWidget>::QDeclarativeElement()': ..\..\include/QtDeclarative/../../../../Source/qt/src/declarative/qml/qdeclarativeprivate.h:85:11: instantiated from 'void QDeclarativePrivate::createInto(void*) [with T = QGraphicsWidget]' ..\..\include\QtDeclarative/../../../../Source/qt/src/declarative/qml/qdeclarative.h:185:5: instantiated from 'int qmlRegisterType(const char*, int, int, const char*) [with T = QGraphicsWidget]' m:\Development\Source\qt\src\declarative\graphicsitems\qdeclarativeitemsmodule.cpp:154:64: instantiated from here ..\..\include/QtDeclarative/../../../../Source/qt/src/declarative/qml/qdeclarativeprivate.h:85:11: error: no matching function for call to 'QFlags<Qt::WindowType>::QFlags(int)' ..\..\include/QtCore/../../../../Source/qt/src/corelib/global/qglobal.h:2181:12: note: candidates are: QFlags<Enum>::QFlags(QFlag) [with Enum = Qt::WindowType] ..\..\include/QtCore/../../../../Source/qt/src/corelib/global/qglobal.h:2180:12: note: QFlags<Enum>::QFlags(QFlags<Enum>::Zero) [with Enum = Qt::WindowType, QFlags<Enum>::Zero = void**] ..\..\include/QtCore/../../../../Source/qt/src/corelib/global/qglobal.h:2179:12: note: QFlags<Enum>::QFlags(Enum) [with Enum = Qt::WindowType] ..\..\include/QtCore/../../../../Source/qt/src/corelib/global/qglobal.h:2178:12: note: QFlags<Enum>::QFlags(const QFlags<Enum>&) [with Enum = Qt::WindowType, QFlags<Enum> = QFlags<Qt::WindowType>] ..\..\include/QtDeclarative/../../../../Source/qt/src/declarative/qml/qdeclarativeprivate.h: In function 'void QDeclarativePrivate::createInto(void*) [with T = QGraphicsWidget]': ..\..\include/QtDeclarative/../../../../Source/qt/src/declarative/qml/qdeclarativeprivate.h:94:37: note: synthesized method 'QDeclarativePrivate::QDeclarativeElement<QGraphicsWidget>::QDeclarativeElement()' first required here GCC 4.5.2 (snapshot) and 4.4.5 (snapshot) don't exhibit this behavior and compile the file fine. The attached zip files contain the preprocessed sources for GCC 4.5 and the above GCC 4.6.