R-devel, bool, and C23
On Sat, 15 Mar 2025 07:51:11 -0500
Dirk Eddelbuettel <edd at debian.org> wrote:
/usr/local/lib/R-devel/lib/R/include/R_ext/Boolean.h:62:16: warning: ISO C does not support specifying ?enum? underlying types before C23 [-Wpedantic]
62 | typedef enum :int { FALSE = 0, TRUE } Rboolean; // so NOT NA
A | ^
I think that the configure test [1] succeeds in non-C23 mode because the test program compiles successfully (despite the warning), causing the enum-related warning for any compilation units that include R_ext/Boolean.h. Since there may be no portable way to specify CFLAGS=-Werror for the AC_RUN_IFELSE(...) test, perhaps the configure test should also test for the reported C standard version? But that of course could also be wrong...