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

C++ preprocessor bug

New Contributor I

Using Intel C++ 14.0.4 or 15.0.0, with -std=c++11 passed to the compiler, given:

#define VMACRO(x,...) x __VA_ARGS__

if this is invoked with:


it should be a preprocessing error but Intel C++ accepts it. Both gcc and clang also accept it as a compiler extension but flag it as an error if the '-pedantic-errors' compiler flag is used. Since it is an error according to the C++11 standard ( section 16.3, paragraph 4 ), should not Intel C++ flag it as such ? Or does Intel C++ also have a compiler flag which, when passed on the command line, correctly flag it as an error ?






0 Kudos
0 Replies