From 9a38fc5751ff0d53f91340e212bc3e73048fffe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20=C3=9Acar?= Date: Tue, 23 Dec 2025 15:32:17 +0100 Subject: [PATCH] Mask definition of Rf_error to avoid longjmp issues --- inst/include/Rcpp/macros/mask.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/inst/include/Rcpp/macros/mask.h b/inst/include/Rcpp/macros/mask.h index 29bca519a..3c9a501b1 100644 --- a/inst/include/Rcpp/macros/mask.h +++ b/inst/include/Rcpp/macros/mask.h @@ -21,15 +21,13 @@ #define Rcpp_macros_mask_h #ifndef RCPP_NO_MASK_RF_ERROR -#ifdef RCPP_MASK_RF_ERROR #define Rf_error(...) \ - _Pragma("GCC warning \"Use of Rf_error() instead of Rcpp::stop(). Calls \ + _Pragma("GCC error \"Use of Rf_error() instead of Rcpp::stop(). Calls \ to Rf_error() in C++ contexts are unsafe: consider using Rcpp::stop() instead, \ or define RCPP_NO_MASK_RF_ERROR if this is a false positive. More info:\n\ - https://github.com/RcppCore/Rcpp/issues/1247\n\ - https://github.com/RcppCore/Rcpp/pull/1402\"") \ Rf_error(__VA_ARGS__) #endif -#endif #endif