Expose issue with multiple anonymous struct. #688
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I expect this test to pass since it is copy pasted from a previous valid test. The generated code trigger ocaml warning 11 and I think it should be related. I don't know how to fix if you give me pointer I can try.
I get:
I also tried to reproduce with union and got same warning.
So this seem to be same issue
I don't see test for anonymous enum and I think we can trigger this defect in some unusual compiler like chibicc. See on https://godbolt.org with:
Since gcc and clang, tcc emit an error this should be a faulty compiler. However for struct this pattern can be seen on skia https://github.com/google/skia/blob/1f193df9b393d50da39570dab77a0bb5d28ec8ef/include/c/sk_types.h#L77-L89