Use Intel specific pragma to disable unknown attribute warning #278
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See r-lib/systemfonts#98 for the original issue. That issue turned out to be a different error, but this PR still silences the warning that appeared there. The original issue poster confirmed that this PR fixed the warning.
On the Intel compiler (icpc), it looks like our pragmas to disable unknown attribute warnings are not working, i.e. in the original issue the user saw:
On the Intel compiler, it looks like you disable warnings using the diagnostic number instead, in this case that is the
#3924
you see in the warning output above. The following two resources support this. In particular, the second resource disables the exact warning that we are also trying to disable, so it serves as a good reference:To detect the Intel compiler, we need to look for
__INTEL_COMPILER
. But it seems like the Intel compiler also defines__GNUC__
, so I've tweaked the defines a little to reflect that. See theGCC C/C++
andIntel C/C++
sections of the following resource: