[Rd] R-devel, bool, and C23

Ivan Krylov |kry|ov @end|ng |rom d|@root@org
Sat Mar 15 14:26:31 CET 2025


On Sat, 15 Mar 2025 07:51:11 -0500
Dirk Eddelbuettel <edd using 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...

-- 
Best regards,
Ivan

[1]
https://github.com/r-devel/r-svn/blob/886ba5f282a82d6f327211b08b4fa502641c7ef8/m4/R.m4#L5442-L5459



More information about the R-devel mailing list