-
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.
-
Author Maintainer
Actually the intel version of
complex
, included aftercomplex.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 likewarning(msg)
in ourdebug.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 likenanos_warning
instead.
Please register or sign in to comment