[RFC v4 1/4] cdefs: Add __bool

Zack Weinberg zack@owlfolio.org
Sun Sep 14 14:57:03 GMT 2025


On Sun, Sep 14, 2025, at 2:01 AM, Alejandro Colomar wrote:
> +#if defined __cplusplus
> +# define __bool  bool
> +#else
> +# define __bool  _Bool
> +#endif

Serious question: should this be this, or should it instead be

#if defined __cplusplus
# define __bool  bool
#elif defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
# define __bool  _Bool
#else
# error "GNU libc requires a C compiler that supports ISO C 1999"
#endif

? I can make an argument either way.

zw


More information about the Libc-alpha mailing list