6

I cannot find a reliable document on how to avoid warnings with a pragma. The documentation says that the warning pragma is compatible with Microsoft compiler so it should be:

#pragma warning ( push )
#pragma warning ( disable:1234 )
#pragma warning ( pop )

which is not working with icc (ICC) 15.0.3 20150407 on a GNU/Linux system.

However, what is working is:

#pragma warning disable 1234

I could not find any working syntax for the push/pop however. Does somebody know where to look to get some official documentation about that?

sloriot
  • 6,070
  • 18
  • 27

1 Answers1

0

I came across this thinking I was seeing the same problem. However, further investigation showed that icpc 2015 was following Microsoft #pragma warning push and pop syntax. The reason I initially thought it was not is that the warnings were not coming from the header I had wrapped with the push/pop but from the instantiation of a template function. See David's answer here.

A.E. Drew
  • 2,097
  • 1
  • 16
  • 24