- Notifications
You must be signed in to change notification settings - Fork 15k
[compiler-rt] fix gcc 12 support by removing enum-type-specifier #165034
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
base: main
Are you sure you want to change the base?
Conversation
| This isn't fine sadly - the signedness is platform specific. This needs to be preserved. I think that requiring GCC 13+ is acceptable. This is not building LLVM, it is target code. |
Sorry if I didn't make it clear. I am trying to say that the enum doesn't need to be |
But it does. The recent change changed the struct member from |
| Thanks @yuxuanchen1997 for pointing out that using typed enums is c23, I missed that. My goal with introducing the enum was to prevent errors like the one I fixed in the PR with CWF. I think we could keep the enum as an argument type, revert to unsigned int in the struct, and cast when calling the function. Would that be okay? |
Would be in favor of that solution. |
Thanks. That would be ok for me. |
Yeah, that would be fine. I don't have a strong opinion between the two as long as the ABI is not changed. |
| Alright, I can file a PR with a fix shortly |
Double checking this... You probably still have (some theoretical) ABI issues if the enums are used as arguments to |
Correct, but the members of the structure is more what I was concerned about. The other functions should be fine (they shouldn't be used outside of the module). |
| Here's a PR #165048 |
This
unsigned inthere is a new addition introduced in #164713 and doesn't compile under older (<13) gcc (see godbolt), which LLVM officially supports from 7.4+. This change should be fine as none of the enum values are negative.