Skip to content

Conversation

@DavisVaughan
Copy link
Member

@DavisVaughan DavisVaughan commented Aug 17, 2022

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:

In file included from caches.cpp(1):
caches.h(22): warning #3924: attribute namespace "cpp11" is unrecognized
  [[cpp11::init]]

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 the GCC C/C++ and Intel C/C++ sections of the following resource:

@DavisVaughan DavisVaughan marked this pull request as ready for review August 22, 2022 13:10
@DavisVaughan DavisVaughan force-pushed the fix/intel-compiler-warning branch from 379c7d7 to b762066 Compare August 25, 2022 14:08
@DavisVaughan DavisVaughan requested a review from thomasp85 August 25, 2022 15:13
@DavisVaughan DavisVaughan force-pushed the fix/intel-compiler-warning branch from bfebb9c to 3561fcc Compare November 11, 2022 18:39
@DavisVaughan DavisVaughan merged commit 2ddc12f into r-lib:main Nov 11, 2022
@DavisVaughan DavisVaughan deleted the fix/intel-compiler-warning branch November 11, 2022 19:34
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants