Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is stdbool.h deprecated? [closed]

Tags:

c

c11

stdbool

The C standard now says:

The ability to undefine and redefine the macros bool, true, and false is an obsolescent feature and may be removed in a future version.

That is, stdbool.h is deprecated. But no rationale is given and I couldn't find one. Do they intend on adding bool as a basic type for good or is there something else ?

If you happen to know why this is deprecated, thank you for telling me !

like image 747
Lærne Avatar asked Dec 16 '25 12:12

Lærne


1 Answers

Why is stdbool.h deprecated?

It's not.

You quoted the following note:

The ability to undefine and redefine the macros bool, true, and false is an obsolescent feature and may be removed in a future version.

What this means is that the following paragraph may be removed in the future:

An application may undefine and then possibly redefine the macros bool, true, and false.

That does not mean that the header or its contents will be removed.

like image 196
sepp2k Avatar answered Dec 19 '25 05:12

sepp2k



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!