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

Replace zero size array members #232

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

BarrOff
Copy link
Contributor

@BarrOff BarrOff commented Jan 5, 2021

Hello,

follow up from #224, there were still some zero size array members left.
I replaced them with flexible array members. This caused problems, because flexible array members are not allowed in unions.
Therefore the anonymous struct was put into it's own named struct.

This change enables compilation using -stc=c99, instead of gnu99, which should increase compatibility with C-compilers.

Using -D_XOPEN_SOURCE=700 instead of -D_GNU_SOURCE should increase portability.

Compiling with -Wextra -Wpedantic, the compiler issued a warning, that anonymous unions are an extension in C11. The easiest fix could be using -std=c11 or is there a reason for using C99?

Best regards,
BarrOff

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.

1 participant