Skip to content

Commit ce5cee3

Browse files
committed
messages are considered statements by gcc and cannot be used safely; switching to a warning
1 parent 088535b commit ce5cee3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ChangeLog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
2025-11-12 Iñaki Ucar <[email protected]>
22

33
* inst/include/Rcpp/macros/mask.h: Lay the ground for Rf_error masking
4-
with a message at compilation time unless RCPP_NO_MASK_RF_ERROR is defined
4+
with a warning at compilation time unless RCPP_NO_MASK_RF_ERROR is defined
55
* inst/include/RcppCommon.h: Include the previous file in the last place
66
* src/attributes.cpp: Use parentheses to protect call to Rf_error
77
* inst/tinytest/cpp/stack.cpp: Idem

inst/include/Rcpp/macros/mask.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
#ifndef RCPP_NO_MASK_RF_ERROR
2424
#define Rf_error(...) \
25-
_Pragma("message \"Use of Rf_error() instead of Rcpp::stop(). Calls \
25+
_Pragma("GCC warning \"Use of Rf_error() instead of Rcpp::stop(). Calls \
2626
to Rf_error() in C++ contexts are unsafe: consider using Rcpp::stop() instead, \
2727
or define RCPP_NO_MASK_RF_ERROR if this is a false positive. More info:\n\
2828
- https://github.com/RcppCore/Rcpp/issues/1247\n\

0 commit comments

Comments
 (0)