-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix "anonymous types declared in an anonymous union" warnings #44807
Fix "anonymous types declared in an anonymous union" warnings #44807
Conversation
Note that this also affects |
Related issue: #44314 |
Can't this just be merged? There is zero risk, is there? At the worst, reverting it is trivial... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want to preserve a comment here? (similar to how we write ssaflags above in the file)
Keno says this is fine, as long as the structure is preserved in a comment, per Jameson's request. |
They look like this: ``` CC src/processor.o In file included from /Users/mhorn/Projekte/Julia/julia.master/src/processor.cpp:10: In file included from ./processor.h:5: ./julia.h:395:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types] struct { ^ ./julia.h:405:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types] struct { ^ 2 warnings generated. ``` and come from code that was introduced by @Keno in PR JuliaLang#43852. But it turns out that the union is not used at all! So I'm simply removing the offending union. Perhaps it is needed for some future work, but it should be trivial to add it back if needed. If that happens, I suggest a comment is added that explain why this looks similar to but has different layout compared to the `typedef _jl_purity_overrides_t` also in `julia.h`.
1c1c5eb
to
098bce0
Compare
I've now retained the union, commented out. I don't know how to make it similar to |
Yeah, this looks fine to me. Thanks! |
They look like this: ``` CC src/processor.o In file included from /Users/mhorn/Projekte/Julia/julia.master/src/processor.cpp:10: In file included from ./processor.h:5: ./julia.h:395:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types] struct { ^ ./julia.h:405:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types] struct { ^ 2 warnings generated. ``` and come from code that was introduced by @Keno in PR #43852. But it turns out that the union is not used at all! So I'm simply removing the offending union. Perhaps it is needed for some future work, but it should be trivial to add it back if needed. If that happens, I suggest a comment is added that explain why this looks similar to but has different layout compared to the `typedef _jl_purity_overrides_t` also in `julia.h`. (cherry picked from commit bb91e62)
They look like this:
and come from code that was introduced by @Keno in PR #43852.
But it turns out that the union is not used at all! So I'm simply removing
the offending union. Perhaps it is needed for some future work, but it should
be trivial to add it back if needed. If that happens, I suggest a comment
is added that explain why this looks similar to but has different layout
compared to the
typedef _jl_purity_overrides_t
also injulia.h
.