Skip to content

Comments

Add C90 bool support#249

Closed
pjonsson wants to merge 1 commit intointel:mainfrom
pjonsson:c90-bool
Closed

Add C90 bool support#249
pjonsson wants to merge 1 commit intointel:mainfrom
pjonsson:c90-bool

Conversation

@pjonsson
Copy link
Contributor

The bool datatype was added in C99,
so make a typedef for pre-C99 versions
of C, and define true/false.

The bool datatype was added in C99,
so make a typedef for pre-C99 versions
of C, and define true/false.
@pjonsson pjonsson mentioned this pull request Nov 26, 2023
Comment on lines +51 to +57
typedef int bool;
# ifndef true
# define true 1
# endif
# ifndef false
# define false 0
# endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is correct, but such not a good idea in a public header.

I think we're just going ban C89 builds.

@thiagomacieira
Copy link
Member

Thank you for the effort, but no, I think we will reject.

@pjonsson pjonsson deleted the c90-bool branch November 27, 2023 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants