Skip to content
  • Would this be a "good" solution?

    #ifdef __INTEL_COMPILER
    #pragma warning push
    #pragma warning disable 308 // disable member inaccessible warning for std::complex
    #endif
    
    #include <complex.h>
    
    #ifdef __INTEL_COMPILER
    #pragma warning pop
    #endif

    It works, at least, with Intel 2017.3. And it seems it should work going back to version 13, according to the Intel forums, but I have not tested it.

    Edited by Isaac Sánchez Barrera
  • Actually the intel version of complex, included after complex.h, already disables this warning at least in the 2017 versions. The problem is that the Intel preprocessor expands any macro in any known pragma. It is unfortunate that we define some utility macros like warning(msg) in our debug.hpp header that ends disabling the actual pragma.
    By including Intel's complex header before ours, we avoid that situation, but obviously we need a good fix. If we don't find any specific flag to disable this Intel behaviour (that seems almost bugged to me btw, because it should affect the contents of the pragma if any, but not the pragma guard), we'll need to refactor our macros to something like nanos_warning instead.

    Edited by Victor Lopez
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment