-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
jump into statement expression in unevaluated context #63682
Comments
Still happens in trunk: https://godbolt.org/z/qnxq9a3WP |
@llvm/issue-subscribers-clang-frontend |
I feel like we should diagnose this like this case: void f() {
label:
{}
}
void g() {
goto label;
} but looking at how |
@shafik agreed, we are probably not supposed to jump contexts! |
gcc produces "error: jump into statement expression". We probably want something similar. (I think we need to continue support jumping out of statement expressions, i.e. a goto inside a statement expression with a label outside it.) |
https://reviews.llvm.org/D154696 Note that this is technically a breaking change. I wonder if anyone cares about jumping into expression statements though (it's not supported by GCC) |
I had to revert. The issue is that @jyu2-git any idea? |
Sorry I don't really remember this. It looks like the problem related to ScopeChecking with HasBranchProtectedScope. |
The problem seems to be the targets is not asm_goto's label. The error message is wrong. I think the check only needed if the asm_goto's label == taregetLabel. I will fix this. |
The C program
makes Clang crash
The text was updated successfully, but these errors were encountered: