Open serge-sans-paille opened 3 months ago
@emilio even if that change is correct from a compiler point of view, it would actually break mozilla code if gnu behavior is of by default because the firefox codebase is making an optimistic use of flexible array members. I guess it's still good to merge this, but with gnu behavior on by default. What do you think?
@emilio even if that change is correct from a compiler point of view, it would actually break mozilla code if gnu behavior is of by default because the firefox codebase is making an optimistic use of flexible array members.
Can you elaborate? Do you have an example?
There a re three ways to express flexible array members:
char fam[0];
char fam[1];
char fam[];
is the only standard way (in c99, but supported in c++ as an extension), the other two are GNU syntax (still supported in clang though).
Let's generate the standard syntax by default, while leaving it possible to use 1. through struct.gnu_flexible_array_members
Cython only supports the 1. mode.