Warning #1879: unimplemented pragma ignored

Building on Windows with Intel c++ compiler (v19) within an MSVC project, I get these warnings:

warning #1879: unimplemented pragma ignored

When building cpp files that contain:

  #pragma intrinsic (__cpuid)
  #pragma intrinsic (__rdtsc)

JUCE is v6.0.7.

My project is set to “warnings as errors” and I would like to keep it this way.
I saw a previous discussion about it here without an apparent resolution.

Please advise,

AFAIK, JUCE doesn’t support the Intel C++ compiler. The JUCE team might be fine with community contributions to support it, but I don’t think they plan to do it themselves.

Actually there are many places that mention __INTEL_COMPILER, e.g.:

#if JUCE_MSVC && ! defined (__INTEL_COMPILER)
 #pragma intrinsic (_BitScanReverse)

…in juce_BigInteger.cpp


#if defined(__INTEL_COMPILER)
    return _bit_scan_reverse(v) ^ 31U;

…in bitmath.h

The first example is exactly what would resolve my issue if placed within all occurrences of this pragma.

@jules can this be added?


I’ve added this change here:

Please let us know if you run into any further issues.

This is perfect. I can also see “#pragma intrinsic” in CAAtomic.h, however didn’t compile it so I can’t report a problem there.

Is this fix going to be included in a future version, or can I add it to my current 6.0.7 and how?

If you use git, you can use this change by checking out develop. If you’d prefer to wait for a stable release, this change will be part the next version release of JUCE, although we haven’t currently set a release date.

1 Like

Alternatively you can stay on the git master and cherry pick this commit from the develop branch – this is what we do from time to time :slight_smile:

1 Like