Quantcast
Channel: Intel® C++-Compiler
Viewing all articles
Browse latest Browse all 1665

Bug : icc14 fails to understand _Pragma when using distcc

$
0
0

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)

 

AnhangGröße
Herunterladenpragma.cpp240 Bytes

Viewing all articles
Browse latest Browse all 1665

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>