[R-pkg-devel] AlgDesign C Issue

Serguei Sokol @ergue|@@oko| @end|ng |rom gm@||@com
Tue Apr 1 10:26:44 CEST 2025


Le 31/03/2025 à 18:00, Jerome Braun a écrit :
> Hi Duncan!
> 
>>   Since the compiler will supply stdbool.h, it's safer to use that than to
> try to emulate it.
> 
> Understood. It seems like the definitions are exactly the same between the
> two.
Yes and no. Yes, true and false are the same. No, because there is also 
__bool_true_false_are_defined which is set to 1 and this can make the 
compiler react differently in various situations.

> 
> Currently there is no use of "bool" in any of the code (after having
> changed bool to int everywhere in the code).
> 
> So I think I can replace the two lines in the original code with a call to
> include the <stdbool.h> header --- does that seem reasonable?   Can I use
> an include statement there in place of those two lines?
I think it would be good and safe idea.

Best,
Serguei.

> 
> Thank you!



More information about the R-package-devel mailing list