- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Comron S. wrote:
Attached is an example reproducing this bug. This is a regression from the 12.x version of the compiler, and I hope it gets a higher priority for fixing.
what are the cmd options used? I'm not able to duplicate this issue from "intelbug.cpp".
C:\Jennifer\Issues>icl /c /Qstd=c++0x intelbug.cpp
Intel(R) C++ Compiler XE for applications running on IA-32, Version 13.1.1.171 Build 20130313
Copyright (C) 1985-2013 Intel Corporation. All rights reserved.
intelbug.cpp
C:\Jennifer\Issues>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jennifer here is how I've been able to reproduce it:
$ icpc -o intelbug --std=c++0x intelbug.cpp
intelbug.cpp(14): error: expression must have integral or unscoped enum type
case test_enum_t::ONE:
^intelbug.cpp(17): error: expression must have integral or unscoped enum type
case test_enum_t::TWO:
^intelbug.cpp(20): error: expression must have integral or unscoped enum type
case test_enum_t::THREE:
^compilation aborted for intelbug.cpp (code 2)
$ icpc --version
icpc (ICC) 13.1.1 20130313
Copyright (C) 1985-2013 Intel Corporation. All rights reserved.
This linux version number seems to correlate to yorur windows version number according to http://software.intel.com/en-us/articles/intel-compiler-and-composer-update-version-numbers-to-compiler-version-number-mapping, so maybe this is just a bug in the linux code? (Somehow that doesn't seem right though)
Any help would be appriciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok. I can duplicate the error with 13.1, but with 12.1, I still get errors.
Below is the 12.1 errors:
/quad/issues> icpc -o intelbug --std=c++0x intelbug.cpp
icpc: command line warning #10006: ignoring unknown option '-fstd=c++0x'
intelbug.cpp(4): error: expected either a definition or a tag name
enum class test_enum_t : int {
^
intelbug.cpp(4): error: expected an identifier
enum class test_enum_t : int {
^
intelbug.cpp(4): error: expected a ";"
enum class test_enum_t : int {
^
intelbug.cpp(8): warning #12: parsing restarts here after previous syntax error
};
^
intelbug.cpp(11): error: identifier "test_enum_t" is undefined
test_enum_t value = test_enum_t::TWO;
^
intelbug.cpp(11): error: name followed by "::" must be a class or namespace name
test_enum_t value = test_enum_t::TWO;
^
intelbug.cpp(14): error: name followed by "::" must be a class or namespace name
case test_enum_t::ONE:
^
intelbug.cpp(17): error: name followed by "::" must be a class or namespace name
case test_enum_t::TWO:
^
intelbug.cpp(20): error: name followed by "::" must be a class or namespace name
case test_enum_t::THREE:
^compilation aborted for intelbug.cpp (code 2)
/quad/issues> icpc --version
icpc (ICC) 12.1.6 20120928
Copyright (C) 1985-2012 Intel Corporation. All rights reserved./quad/issues>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I'm quite sure it works. You seem have the wrong -std flag in your test case.
> icpc -o intelbug -std=c++0x intelbug.cpp
> ./intelbug
Case TWO
> icpc --version
icpc (ICC) 12.1.3 20120212
Copyright (C) 1985-2012 Intel Corporation. All rights reserved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there any update on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is fixed in the 14.0 beta. The problem was that scoped enums weren't allowed as case labels (DPD200289819) not that the feature wasn't supported. Jennifer, the reason you were getting errors with 12.1 is because you were using the --std=c++0x not the -std=c++0x option.
Judy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yeh, Judy and Comron S are right. I used "--std" instead "-std" when trying with icpc 12.1.
btw. to get the 14.0 beta, you can join the beta program and download it. see this posting.
Jennifer

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