-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
Improvement: diagnose undefined behavior: within a translation unit the same identifier appears with both internal and external linkage #54215
Comments
@llvm/issue-subscribers-good-first-issue |
Agreed that we should issue a diagnostic in this case. C2x 6.2.2p7: If, within a translation unit, the same identifier appears with both internal and external linkage, the behavior is undefined. (There's a lot of good examples for test cases in C++ in http://eel.is/c++draft/dcl.stc#example-1) |
@jakevossen5 @junaire Any interest / time / motivation in fixing this issue? |
I can have a try... But I'm not super familiar with this code path. Would you like to explain it a little bit to me? Thanks! @AaronBallman |
I think the most logical place I'd start looking is in |
@junaire I see it this way: within a translation unit:
|
Hello, Is there any one working on this? |
@elhewaty: Usual signs of work are filled |
I'm sorry lately I've been busy with other stuff and don't look into the issue too much, feel free to take over!
Welcome! don't hesitate to ask questions if you have any problems! |
@junaire
Is this a good point to start from? |
Sorry @elhewaty, I didn't realize you hadn't gotten an answer to your question! Are you still interested in working on this (it's totally fine if you're not)?
Yeah, that's roughly where I would start to look.
I don't think you should have to store anything in a map like that. By the point we're calling |
Hello @AaronBallman, I didn't see your reply sorry for that. I started contributing to LLVM middle end lately by working on |
Expected diagnostics:
Actual diagnostics:
C11:
The text was updated successfully, but these errors were encountered: