-
Notifications
You must be signed in to change notification settings - Fork 349
[Prolangs-C] Fix compilation errors with clang 15 and above #223
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
Conversation
Am I missing something obvious? It seems odd that I am the first person to stumble across this issue with clang. |
BTW - AFAICT this code came from (Rutgers, then Virginia Tech - https://prolangs.cs.vt.edu/rutgers/ → https://prolangs.cs.vt.edu/). But it's not maintained there? Is this fork of prolangs-C safe to update in |
ae245ef
to
3494f09
Compare
I think they would have been downloaded from this page - https://prolangs.cs.vt.edu/rutgers/software.php. This is a collection of existing software, put together some time around 1997 going by the modification dates. Used for some research, so 1. they wouldn't change it because it needs to match that research and 2. all these would have their own upstream locations, assuming they still exist. This one I've no idea how I'd even find it. We have code changes made to it already: https://github.com/llvm/llvm-test-suite/commits/main/MultiSource/Benchmarks/Prolangs-C/assembler It's not under a specific license but includes:
So for some definition of "use" we are still complying with that. TLDR: it's fine to modify this here in llvm-test-suite, or at least, as fine as it was for the previous changes :) Also surprised this hasn't come up before. Would be good to include in the commit message why this error happens and what version of clang started doing it. |
I think this is it:
https://godbolt.org/z/7q8zbPTcq 15 is the first one to error here. |
Correcting these function declarations addresses these compilation errors: ``` llvm-test-suite/MultiSource/Benchmarks/Prolangs-C/loader/sym_tab.c:40:5: error: conflicting types for 'INSERT_IN_SYM_TAB' 40 | int INSERT_IN_SYM_TAB(char *MODULE,char *LABEL,int LOCATION,enum kind TYPE, | ^ llvm-test-suite/MultiSource/Benchmarks/Prolangs-C/loader/sym_tab.h:52:12: note: previous declaration is here 52 | extern int INSERT_IN_SYM_TAB(); | ^ 1 error generated. llvm-test-suite/MultiSource/Benchmarks/Prolangs-C/assembler/sym_tab.c:40:5: error: conflicting types for 'INSERT_IN_SYM_TAB' 40 | int INSERT_IN_SYM_TAB(char *MODULE,char *LABEL,int LOCATION,enum kind TYPE, | ^ llvm-test-suite/MultiSource/Benchmarks/Prolangs-C/assembler/sym_tab.h:52:12: note: previous declaration is here 52 | extern int INSERT_IN_SYM_TAB(); | ^ 1 error generated. ``` Since clang 15.x, this has been an error for C programs.
3494f09
to
023151e
Compare
Thanks - I have updated the commit message. |
I should have been clearer, the commit message is now fine, but for it to be used for the final commit message when we "Squash and merge" it needs to be placed in the PR's description as well. (this is due to the GitHub setting llvm has chosen for its repositories) |
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.
Looks good to me, I will merge once the PR's description is updated.
Gee: that's not my favorite feature. Oh well. Thanks for the heads up, commit message(s) are fixed now. |
Even if you are the first to hit this (which I doubt), I can't imagine you would have been the last. So thanks for contributing a fix! |
Correcting these function declarations addresses these compilation errors:
Since clang 15.x, this has been an error for C programs.