Skip to content

Commit 9a38fc5

Browse files
committed
Mask definition of Rf_error to avoid longjmp issues
1 parent fd7ad87 commit 9a38fc5

File tree

1 file changed

+1
-3
lines changed
  • inst/include/Rcpp/macros

1 file changed

+1
-3
lines changed

inst/include/Rcpp/macros/mask.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,13 @@
2121
#define Rcpp_macros_mask_h
2222

2323
#ifndef RCPP_NO_MASK_RF_ERROR
24-
#ifdef RCPP_MASK_RF_ERROR
2524
#define Rf_error(...) \
26-
_Pragma("GCC warning \"Use of Rf_error() instead of Rcpp::stop(). Calls \
25+
_Pragma("GCC error \"Use of Rf_error() instead of Rcpp::stop(). Calls \
2726
to Rf_error() in C++ contexts are unsafe: consider using Rcpp::stop() instead, \
2827
or define RCPP_NO_MASK_RF_ERROR if this is a false positive. More info:\n\
2928
- https://github.com/RcppCore/Rcpp/issues/1247\n\
3029
- https://github.com/RcppCore/Rcpp/pull/1402\"") \
3130
Rf_error(__VA_ARGS__)
3231
#endif
33-
#endif
3432

3533
#endif

0 commit comments

Comments
 (0)