Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support defining C99 bool as the BOOL type #322

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

2xsaiko
Copy link
Contributor

@2xsaiko 2xsaiko commented Dec 18, 2024

Whether to use C99 bool can be set at build time using
-DOBJC_BOOL_IS_BOOL_MODE=auto/always/never.

Default is to use C99 bool if __OBJC_BOOL_IS_BOOL is defined and
set to 1, which is currently the case for Clang on newer Apple
platforms. This matches the behavior of Apple's libobjc (especially
when combined with STRICT_APPLE_COMPATIBILITY).

(See
https://www.jviotti.com/2024/01/05/is-objective-c-bool-a-boolean-type-it-depends.html
for more information about the __OBJC_BOOL_IS_BOOL definition.)


Note turning this on with GNUstep currently breaks Gorm files written with a different BOOL type just like gnustep/libs-gui#318. Potentially needs this gnustep/libs-gui#318 (comment) to be usable.

Whether to use C99 bool can be set at build time using
-DOBJC_BOOL_IS_BOOL_MODE=auto/always/never.

Default is to use C99 bool if __OBJC_BOOL_IS_BOOL is defined and
set to 1, which is currently the case for Clang on newer Apple
platforms. This matches the behavior of Apple's libobjc (especially
when combined with STRICT_APPLE_COMPATIBILITY).

(See
https://www.jviotti.com/2024/01/05/is-objective-c-bool-a-boolean-type-it-depends.html
for more information about the __OBJC_BOOL_IS_BOOL definition.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants