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

t4kcommon fails to build with GCC-15: C23 has bool/true/false as keywords #23

Open
NHOrus opened this issue Mar 10, 2025 · 2 comments
Open

Comments

@NHOrus
Copy link

NHOrus commented Mar 10, 2025

There exists bool guard in t4k_common.h, but such bool guard is insufficient and fails with C23.

t4kcommon/src/t4k_common.h

Lines 125 to 132 in f954f56

#ifndef bool
typedef enum
{
false,
true
}
bool;
#endif

Better to drop defining bools and use sysbool.h, or add guards for C23
See also:
https://bugs.gentoo.org/943953
gentoo/gentoo#40844

@Cheezmeister
Copy link

Cheezmeister commented Mar 11, 2025

Thanks for the attention to detail, @NHOrus ; as you can see this code is 15 years old, so it is definitely time to bring it a few years up to date. stdbool.h is a C99 addition yes? I think we can safely assume it in target systems :)

@NHOrus
Copy link
Author

NHOrus commented Mar 11, 2025

Yes. stdbool.h is basically everywhere and does right thing, all the time.

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

No branches or pull requests

2 participants