Skip to content

Conversation

@eddelbuettel
Copy link
Contributor

@eddelbuettel eddelbuettel commented Nov 24, 2025

We are probably going to include a check in the next Rcpp release which calls messages() when R.h is included before Rcpp.h (or RcppArmadillo.h). This can lead to side-effects regarding things like 'strict headers', Rf_* prefixing and alike. Your package (for which I had a local fork so it came up when grep'ed around) was not affected and there is no need for immediate action, but just as you removed the #include "R.h" from fastLars.cpp before I could nag ... we still have one in corHuber.cpp. (Edit: Oh it tricked me. It is still there, but the whole function is commented out. Updated PR now.)

So the PR here is really trivial and, again, not urgent but it may be a good idea to include it. One day, maybe in a year or two, we may make this a warning instead.

/cc RcppCore/Rcpp#1411, the current open PR for this in Rcpp

@eddelbuettel eddelbuettel changed the title No need to incldue R.h when RcppArmadillo.h gets included No need to include R.h when RcppArmadillo.h gets included Nov 24, 2025
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.

1 participant