cpp11
cpp11 copied to clipboard
Conditional use OF `R_NO_REMAP` and `STRICT_R_HEADERS`
trafficstars
We need to introduce it to avoid this with clang19
In file included from /home/hornik/lib/R/Library/4.5/x86_64-linux-gnu/cpp11/include/cpp11.hpp:3:
/home/hornik/lib/R/Library/4.5/x86_64-linux-gnu/cpp11/include/cpp11/R.hpp:11:9: warning: 'R_NO_REMAP' macro redefined [-Wmacro-redefined]
11 | #define R_NO_REMAP
| ^
<command line>:5:9: note: previous definition is here
5 | #define R_NO_REMAP 1
| ^
In file included from cpp11.cpp:4:
In file included from ./cpp11tesseract_types.h:4:
In file included from /home/hornik/lib/R/Library/4.5/x86_64-linux-gnu/cpp11/include/cpp11.hpp:3:
/home/hornik/lib/R/Library/4.5/x86_64-linux-gnu/cpp11/include/cpp11/R.hpp:12:9: warning: 'STRICT_R_HEADERS' macro redefined [-Wmacro-redefined]
12 | #define STRICT_R_HEADERS
| ^
<command line>:4:9: note: previous definition is here
4 | #define STRICT_R_HEADERS 1
See https://win-builder.r-project.org/incoming_pretest/cpp11tesseract_5.3.3_20241023_161944/specialChecks/clang19/package/00install.out
Relevant commits. Seems like it happens in R CMD check --as-cran in R-devel now. That's a good move on R core's part I think.
https://github.com/wch/r-source/commit/2b3b7b46256f8a864310e1ff386b72e12db9ce75
https://github.com/wch/r-source/commit/5dc1df18a0eab3cc2eb52eb1a2d8608b4809c5d2
Relevant commits. Seems like it happens in
R CMD check --as-cranin R-devel now. That's a good move on R core's part I think.
I sent a PR for this