Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
7679 Discussions

WIN64: incomplete support of attributes for enumerators in Windows ICC

sav
Novice
242 Views

Hello, everyone,

For Qt builds using Windows ICC got error:

        cd corelib\ && ( if not exist Makefile C:\libQT-5.12-dev\build\qtbase\bin\qmake.exe -o Makefile C:\libQT-5.12-dev\build\qtbase\src\corelib\corelib.pro ) && C:\Windows\jom.exe -f Makefile
        C:\Windows\jom.exe -f Makefile.Release
        icl -c -nologo -Zc:wchar_t -Qprec -Zm200 -Zc:forScope  -MT -O3 -Qstd=c++14 -Qoption,cpp,--unicode_source_kind,UTF-8 -EHsc -W3 -Qdiag-disable:673,809,1738,1744,3373 -DUNICODE -D_UNICODE -DWIN32 -DWIN64 -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_NO_DEBUG -DQT_FORCE_ASSERTS -DPCRE2_CODE_UNIT_WIDTH=16 -DPCRE2_STATIC -DNDEBUG -I. -Iglobal -I..\3rdparty\harfbuzz\src -I..\3rdparty\md5 -I..\3rdparty\md4 -I..\3rdparty\sha3 -I..\3rdparty\double-conversion\include -I..\3rdparty\double-conversion\include\double-conversion -I..\3rdparty\tinycbor\src -I..\..\include -I..\..\include\QtCore -I..\..\include\QtCore\5.12.0 -I..\..\include\QtCore\5.12.0\QtCore -Itmp -Itmp\moc\release -I.tracegen\release -IC:\libZLIB-1.2.11\ICC64RT\include -IC:\libICU-63.1-dev\ICC64RT\include -I..\3rdparty\pcre2\src -I..\..\mkspecs\win32-icc -Fo.obj\release\ @C:\Users\test\AppData\Local\Temp\qstring.obj.15316.250.jom
qstring.cpp
tools\qregularexpression.h(76): error: expected a "}"
          OptimizeOnFirstUsageOption Q_DECL_ENUMERATOR_DEPRECATED_X("This option does not have any effect since Qt 5.12") = 0x0080,
                                     ^

qstringlist.cpp
C:\libQT-5.12-dev\build\qtbase\include\QtCore\../../src/corelib/tools/qregularexpression.h(76): error: expected a "}"
          OptimizeOnFirstUsageOption Q_DECL_ENUMERATOR_DEPRECATED_X("This option does not have any effect since Qt 5.12") = 0x0080,
                                     ^

qregularexpression.cpp
tools\qregularexpression.h(76): error: expected a "}"
          OptimizeOnFirstUsageOption Q_DECL_ENUMERATOR_DEPRECATED_X("This option does not have any effect since Qt 5.12") = 0x0080,
                                     ^

tools\qregularexpression.cpp(2724): error: class "QRegularExpression" has no member "DontAutomaticallyOptimizeOption"
          if (patternOptions & QRegularExpression::DontAutomaticallyOptimizeOption)
                                                   ^

qstring_compat.cpp
qvector_msvc.cpp
jom: C:\libQT-5.12-dev\build\qtbase\src\corelib\Makefile.Release [.obj\release\qstring.obj] Error 2
jom: C:\libQT-5.12-dev\build\qtbase\src\corelib\Makefile [release] Error 2
jom: C:\libQT-5.12-dev\build\qtbase\src\Makefile [sub-corelib-make_first] Error 2
jom: C:\libQT-5.12-dev\build\qtbase\Makefile [sub-src-make_first] Error 2
jom: C:\libQT-5.12-dev\build\Makefile [module-qtbase-make_first] Error 2

which relate to recently merged Change #232893, in particular to the code:

diff --git a/src/corelib/tools/qregularexpression.h b/src/corelib/tools/qregularexpression.h

<snip>
-        OptimizeOnFirstUsageOption     = 0x0080,
-        DontAutomaticallyOptimizeOption = 0x0100
+        OptimizeOnFirstUsageOption Q_DECL_ENUMERATOR_DEPRECATED_X("This option does not have any effect since Qt 5.12") = 0x0080,
+        DontAutomaticallyOptimizeOption Q_DECL_ENUMERATOR_DEPRECATED_X("This option does not have any effect since Qt 5.12") = 0x0100,

and the preceding Change #232892 (testcase added in attachment).

 

Reproduced for:

  • builds using Windows ICC,

not reproduced for:

  • builds using mingw-w64 and MSVC.

Environment:

Qt Developers believe it's a compiler bug.

A related paper on open-std.org.

 

Best,

Alexander

 

0 Kudos
2 Replies
Viet_H_Intel
Moderator
242 Views

 

Hi Alexander,

If you try with an older version of VS2017 (i.e. MSVC2017 15.6*), will you see an error with MS compiler?

Thanks,

Viet

sav
Novice
242 Views

Hello, Viet,

Unfortunately I'm unable to revert to the earlier MSVC versions, because it would break many things.

In case that help, Qt CI uses MSVC 2017 15.4.0, and has no issues with this code too.

 

Best,

Alexander

 

Reply