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

[Core] Fix a couple of standards-compliance issues with C99 #81

Merged
merged 1 commit into from
Dec 26, 2024

Conversation

FintasticMan
Copy link
Contributor

@FintasticMan FintasticMan commented Dec 22, 2024

Doesn't fix the ##__VA_ARGS__ warnings, as they aren't easily solved with pure C99.

This only fixes the issues in the public code, more needs to be done to do the same for the implementation.

I guess this does cause an API change in the form of the Clay_SizingAxis struct being changed slightly, but I think everyone should be using the macros so it shouldn't matter that much.

@nicbarker
Copy link
Owner

Hello, thanks for the work! Just quickly, could you walk me through what the compliance issue is for sizeMinMax as it stands? 🙂

@nicbarker nicbarker changed the title Fix a couple of standards-compliance issues with C99 [Core] Fix a couple of standards-compliance issues with C99 Dec 25, 2024
@nicbarker nicbarker added the enhancement New feature or request label Dec 25, 2024
@FintasticMan
Copy link
Contributor Author

Of course! Anonymous unions (i.e. unions in structs or other unions without a name) were only added in C11. See https://en.cppreference.com/w/c/language/union.

Doesn't fix the ##__VA_ARGS__ warnings, as they aren't easily solved
with pure C99.
This only fixes the issues in the public code, more needs to be done to
do the same for the implementation.
@FintasticMan FintasticMan force-pushed the standards-compliance-public branch from 731594f to bc1032a Compare December 26, 2024 17:31
@FintasticMan
Copy link
Contributor Author

@nicbarker I've just updated to the latest main branch, as there were some conflicts.

@nicbarker nicbarker merged commit bec56e6 into nicbarker:main Dec 26, 2024
3 checks passed
@nicbarker
Copy link
Owner

@FintasticMan thanks for the work here!

@FintasticMan FintasticMan deleted the standards-compliance-public branch December 30, 2024 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants