[PATCH] D154696: [Clang] Diagnose jumps into statement expressions

Nathan Chancellor via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 12 14:07:14 PDT 2023


nathanchance added a comment.

In D154696#4494899 <https://reviews.llvm.org/D154696#4494899>, @cor3ntin wrote:

> The issue is  that `VerifyIndirectOrAsmJumps` does not consider that label may be local label at all, I'm not exactly sure how to improve that.
> The fact it works currently seems kind of brittle, what prevent incorrect jumps to be ill-formed is that we looked if a label is defined in the same scope as the `__local__` label introduction, but for the purpose of checking jumps this is not helping at all, not sure if there is a way to break the current implementation in funny ways

That is likely the same reason that we see a similar error when introducing a variable with `__attribute__((__cleanup__(...)))`, which involves the same PowerPC `asm goto` code: https://github.com/ClangBuiltLinux/linux/issues/1886


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154696/new/

https://reviews.llvm.org/D154696



More information about the cfe-commits mailing list