C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Don't get rid of <stdbool.h>

From: Halalaluyafail3 <luigighiron_at_[hidden]>
Date: Mon, 23 Nov 2026 16:34:01 -0500
<stdbool.h> and <stdalign.h> are not deprecated in C. The only header
which is obsolescent in C is <stdnoreturn.h>, and that is because
instead of making a noreturn keyword it was decided to make noreturn
an attribute like C++.

On Mon, Nov 23, 2026 at 4:11 PM Frederick Virchanza Gotham via
Std-Proposals <std-proposals_at_[hidden]> wrote:
>
>
> I don't know if there are plans to deprecate <stdbool.h> and <stdalign.h> now that they have been replaced with keywords in C, but I'd just like to say that I think that they should be kept forever in both C and C++, especially because there's such wide variety in what standards of C are used (some still on C89).
>
> It's nice to be able to write a header file as follows:
>
> #include <stdbool.h>
> extern bool Init(void);
>
> instead of having to do:
>
> #ifndef __cplusplus
> # include <stdbool.h>
> #endif
> extern bool Init(void);
>
> I think it was a mistake for them to deprecate these headers in C23, because now we have to do:
>
> #if !__cplusplus && __STDC_VERSION__ < 202311l
> # include <stdbool.h>
> #endif
> extern bool Init(void);
>
> I think C should on undeprecate these headers, and I think C++ should never deprecate them.
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2026-11-23 21:34:26