cpp11 icon indicating copy to clipboard operation
cpp11 copied to clipboard

Conditional use OF `R_NO_REMAP` and `STRICT_R_HEADERS`

Open pachadotdev opened this issue 1 year ago • 2 comments
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

pachadotdev avatar Oct 23 '24 17:10 pachadotdev

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

DavisVaughan avatar Oct 23 '24 17:10 DavisVaughan

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.

wch/r-source@2b3b7b4

wch/r-source@5dc1df1

I sent a PR for this

pachadotdev avatar Oct 23 '24 18:10 pachadotdev