This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients loewis, rolland
Date 2008-03-28.04:47:59
SpamBayes Score 0.03210896
Marked as misclassified No
Message-id <47EC787D.40208@v.loewis.de>
In-reply-to <47EC33E5.4070905@ghs.com>
Content
> Some compilers define false and true as macros.

Which compilers specifically? It sounds like a violation of the C
standard to do so, without stdbool.h being included.

> Using stdbool.h when it is available will ensure bool is defined as a 
> type following the correct definition, which may or may not be an enum 
> depending on the compiler.

But would that help in any way with respect to above compilers?
If they don't follow the C standard, why should they provide stdbool.h?

> Even when using gcc, stdbool.h is here to define bool in C language, so 
> why not use it ?

Because we cannot *rely* on stdbool.h being present. Therefore,
inclusion of stdbool.h must be conditional, with a fallback definition
if stdbool.h is absent, and it thus complicates the source code of
Python, with no gain whatsoever.
History
Date User Action Args
2008-03-28 04:48:01loewissetspambayes_score: 0.032109 -> 0.03210896
recipients: + loewis, rolland
2008-03-28 04:48:00loewislinkissue2497 messages
2008-03-28 04:47:59loewiscreate