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

Bug : icc14 fails to understand _Pragma when using distcc

Richard_G_4
Beginner
492 Views

It appears that icc14 has a bug where it doesn't understand _Pragma() if you pass in a preprocessed .ii file, see below & attached pragma.cpp file.

This breaks distcc builds, as it sends the preprocessed file to the remote machine for compilation.

I don't see this bug with icc13, gcc 4.7, gcc 4.8 or clang. I do see this in icc14.0.2 and icc14.0.3. The issue only occurs with _Pragma; #pragma works but we can't use it in our code, as we need to use this macro to support multiple compilers.

$ icc14.0.3 pragma.cpp -c -O0 -Wall -E -o p_icc14.ii
$ icc14.0.3 p_icc14.ii -c
pragma.cpp(3): error #77: this declaration has no storage class or type specifier
  _Pragma("warning(disable:592)")
  ^

pragma.cpp(3): error: a value of type "const char *" cannot be used to initialize an entity of type "int"
  _Pragma("warning(disable:592)")
          ^

pragma.cpp(9): error: expected a ";"
  int foo() {
  ^

pragma.cpp(13): warning #12: parsing restarts here after previous syntax error

compilation aborted for p_icc14.ii (code 2)

 

0 Kudos
2 Replies
MalReddy_Y_Intel
Employee
492 Views

Hi,

Thanks for reporting your issue. I have escalated this issue to development team , I will check status and keep update you.

 

Reddy

0 Kudos
MalReddy_Y_Intel
Employee
492 Views

Hi Richard,

As you raised this issue in premiere support, so we will follow-up with IPS.

Reddy

 

0 Kudos
Reply