https://github.com/AlexVlx commented:

> A side question, is it legal to use the builtin in unstructured control flow, 
> like here: https://godbolt.org/z/no7Kzv19r ? Note, if the answer is "no", 
> then enforcing the builtin to initialize something would (probably) 
> automatically prevent this case, as clang would error out with:
> ```
> error: cannot jump from this goto statement to its label
> note: jump bypasses variable initialization
> ``` 

Many thanks for asking this, I had completely ignored this scenario! I've added 
handling for this which is symmetric with what we already do for `if constexpr` 
or `if available`; indeed, the answer to your question was "no":)


https://github.com/llvm/llvm-project/pull/134016
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to