Use Intel specific pragma to disable unknown attribute warning#278
Merged
DavisVaughan merged 4 commits intor-lib:mainfrom Nov 11, 2022
Merged
Use Intel specific pragma to disable unknown attribute warning#278DavisVaughan merged 4 commits intor-lib:mainfrom
DavisVaughan merged 4 commits intor-lib:mainfrom
Conversation
379c7d7 to
b762066
Compare
romainfrancois
approved these changes
Oct 11, 2022
Co-authored-by: Romain François <romain@rstudio.com>
bfebb9c to
3561fcc
Compare
DavisVaughan
added a commit
to DavisVaughan/cpp11
that referenced
this pull request
Aug 7, 2023
CRAN advised that we revert this since the "Classic" intel compiler this was intended to support is deprecated and will be removed in 2023. It also did not even really help the original issue (r-lib/systemfonts#98) since there were other compilation errors there. Since this is such an old system and we have only ever had 1 report about this, I feel fine reverting it back.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
#3924you 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: