See https://github.com/r-lib/systemfonts/issues/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:
See https://github.com/r-lib/systemfonts/issues/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: