- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, everyone,
For QtBase 'compiler' autotest build using Windows ICC got error:
icl -c -nologo -Zm200 /Qprec /Qwd1744,1738,809,3373 /Zc:forScope -O2 -MD -Qstd=c++14 -EHsc -W3 /Qwd673 -DUNICODE -D_UNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_FORCE_ASSERTS -DQT_TESTLIB_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR="\"C:/libQT-5.11-dev/build/qtbase/tests/auto/other/compiler\"" -DNDEBUG -I. -I..\..\..\..\include -I..\..\..\..\include\QtTest -I..\..\..\..\include\QtCore -Itmp\moc\release -I..\..\..\..\mkspecs\win32-icc -Fo.obj\release\ @C:\Users\test\AppData\Local\Temp\nmC271.tmp tst_compiler.cpp .\tst_compiler.cpp(696): error: expected a "{" namespace NS [[deprecated]] { } ^ .\tst_compiler.cpp(729): warning #2633: attributes are not allowed here [[ ]] void [[ ]] * [[ ]] * [[ ]] ptr = 0; ^ .\tst_compiler.cpp(729): warning #2633: attributes are not allowed here [[ ]] void [[ ]] * [[ ]] * [[ ]] ptr = 0; ^ .\tst_compiler.cpp(730): warning #2633: attributes are not allowed here int B::* [[ ]] pmm = 0; ^ .\tst_compiler.cpp(765): warning #2633: attributes are not allowed here int & [[ ]] lref = i; ^ .\tst_compiler.cpp(766): warning #2633: attributes are not allowed here int && [[ ]] rref = 1; ^ compilation aborted for .\tst_compiler.cpp (code 2) NMAKE : fatal error U1077: '"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\bin\intel64\icl.EXE"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX64\x64\nmake.exe"' : return code '0x2' Stop.
(ICC-preprocessed version added in attachment). Qt Developers believe it's a compiler bug.
Reproduced for:
- Qt5-dev builds using Windows ICC,
not reproduced for:
- Qt5-dev builds using mingw-w64 and MSVC.
Environment:
- Windows 10 x64,
- ICC 2018 Update 1,
- MSVC 2017 15.5.0,
- Windows SDK 10.0.16299.15,
- mingw-w64 x86_64 posix seh 7.2.0,
- Qt5-dev (9cb9e7654a8be9e53c52c1bf2ff46ad65ad1802a).
Best,
Alexander
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've only looked at the error (not the warnings).
For this small test case:
namespace NS [[deprecated]] { }
The latest version of MSVC++ I tried gives a similar compilation error. The latest version of GNU gives a warning (even with -std=c++17).
According to this paper the deprecated attribute is not allowed on namespaces in c++14:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3760.html
In c++17 the attribute specifier is allowed on namespaces but not after the namespace name:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4266.html
so this compiles (with both MSVC and icl and is I think the only correct syntax:
namespace [[deprecated]] NS { }
It does look like (at least some) of the warnings coming from icl are incorrect - I will look at those and post another followup later..
Judy.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've only looked at the error (not the warnings).
For this small test case:
namespace NS [[deprecated]] { }
The latest version of MSVC++ I tried gives a similar compilation error. The latest version of GNU gives a warning (even with -std=c++17).
According to this paper the deprecated attribute is not allowed on namespaces in c++14:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3760.html
In c++17 the attribute specifier is allowed on namespaces but not after the namespace name:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4266.html
so this compiles (with both MSVC and icl and is I think the only correct syntax:
namespace [[deprecated]] NS { }
It does look like (at least some) of the warnings coming from icl are incorrect - I will look at those and post another followup later..
Judy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for answer, Judith.
Qt Developers confirmed, that it's a Qt bug, and approved a fix (see Change #222672). Although noted, that rest of warnings are likely relate to the compiler.
Best,
Alexander

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page