File tree Expand file tree Collapse file tree 2 files changed +6
-18
lines changed
Expand file tree Collapse file tree 2 files changed +6
-18
lines changed Original file line number Diff line number Diff line change 92922025-11-12 Iñaki Ucar <
[email protected] >
9393
9494 * inst/include/Rcpp/macros/mask.h: Lay the ground for Rf_error masking
95- with a message at compilation time unless RCPP_NO_MASK_RF_ERROR is defined
95+ with a warning at compilation time unless RCPP_NO_MASK_RF_ERROR is defined
9696 * inst/include/RcppCommon.h: Include the previous file in the last place
9797 * src/attributes.cpp: Use parentheses to protect call to Rf_error
9898 * inst/tinytest/cpp/stack.cpp: Idem
Original file line number Diff line number Diff line change 2020#ifndef Rcpp_macros_mask_h
2121#define Rcpp_macros_mask_h
2222
23- namespace Rcpp {
24- namespace internal {
25-
26- template <typename ... Args>
27- void Rf_error (const char *format, Args... args) {
28- ::Rf_error (format, args...);
29- #ifndef COMPILING_RCPP
30- # pragma message "Use of Rf_error() instead of Rcpp::stop(). Calls \
23+ #ifndef RCPP_NO_MASK_RF_ERROR
24+ #define Rf_error (...) \
25+ _Pragma("GCC warning \"Use of Rf_error() instead of Rcpp::stop(). Calls \
3126to Rf_error() in C++ contexts are unsafe: consider using Rcpp::stop() instead, \
3227or define RCPP_NO_MASK_RF_ERROR if this is a false positive. More info:\n\
3328 - https://github.com/RcppCore/Rcpp/issues/1247\n\
34- - https://github.com/RcppCore/Rcpp/pull/1402"
35- #endif
36- }
37-
38- } // internal
39- } // Rcpp
40-
41- #ifndef RCPP_NO_MASK_RF_ERROR
42- #define Rf_error (...) Rcpp::internal::Rf_error(__VA_ARGS__)
29+ - https://github.com/RcppCore/Rcpp/pull/1402\"") \
30+ Rf_error(__VA_ARGS__)
4331#endif
4432
4533#endif
You can’t perform that action at this time.
0 commit comments