Skip to content

Replace zero size array members#232

Open
BarrOff wants to merge 4 commits intoNagyD:masterfrom
BarrOff:replace_zero_size_array_members
Open

Replace zero size array members#232
BarrOff wants to merge 4 commits intoNagyD:masterfrom
BarrOff:replace_zero_size_array_members

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