[Rd] bool?

Ivan Krylov |kry|ov @end|ng |rom d|@root@org
Wed Apr 1 22:00:36 CEST 2026


On Wed, 01 Apr 2026 14:29:59 -0500
"Therneau, Terry M., Ph.D. via R-devel" <r-devel using r-project.org> wrote:

> I have code that works on Rdevel, but for regular R  (4.4.1) the
> compile step fails with messages about "bool". 

> hmmeigen.c:38:5: error: unknown type name ‘bool’; did you mean
> ‘_Bool’?

On R >= 4.5, <R_ext/Boolean.h> includes <stdbool.h>, which (until C23)
provides the 'bool' type and the 'true' / 'false' constants. Starting
with C23, the type and the keywords are built-in, but the header still
exists.

On previous versions of R, <stdbool.h> is not included automatically.

-- 
Best regards,
Ivan



More information about the R-devel mailing list