Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

C++ preprocessor bug

eldiener
New Contributor I
300 Views

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:

VMACRO(1)

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
Reply