The good news is that without a C23-enabled compiler, the problem will only happen to source files that #include <stdbool.h>. The bad news is that such a source file will technically disagree with the rest of R about the type of Rboolean, including the prototypes of the API functions that accept Rboolean:
#include <stdbool.h> #include <Rinternals.h> typedef void (*pordervector1)(int *, int, SEXP, Rboolean, Rboolean); // ... pordervector1 f = R_orderVector1; f(pindx, length(indx), arg, nalast, decreasing); foo.c:27:17: runtime error: call to function R_orderVector1 through pointer to incorrect function type 'void (*)(int *, int, struct SEXPREC *, bool, bool)' /tmp/R-devel/src/main/sort.c:1135: note: R_orderVector1 defined here SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior foo.c:27:17 With sanitizers disabled, this doesn't seem to cause any real problems thanks to the calling convention, where both 'enum's and 'bool's are passed and returned in a register. -- Best regards, Ivan ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel