Skip to content

Conversation

@dblsaiko
Copy link
Contributor

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.

@dblsaiko dblsaiko force-pushed the push-qzyozwqtqtlr branch from ac0168e to fda587d Compare May 2, 2025 20:38
@dblsaiko
Copy link
Contributor Author

dblsaiko commented May 2, 2025

I think this should actually check that __OBJC_BOOL_IS_BOOL is 1 and not just defined. Oops. Hopefully the Windows tests pass now.

@dblsaiko dblsaiko requested a review from davidchisnall May 2, 2025 20:40
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.)
@dblsaiko dblsaiko force-pushed the push-qzyozwqtqtlr branch from fda587d to cf1b308 Compare May 2, 2025 20:41
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