[PATCH] D133887: [Clang] Support label at end of compound statement

Evgeny Shulgin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 19 05:31:55 PDT 2022


Izaron added a comment.

In D133887#3799310 <https://reviews.llvm.org/D133887#3799310>, @aaron.ballman wrote:

> Thank you for working on this! I spotted an issue where we're not quite complete with this implementation work. I pushed up a new test case in https://github.com/llvm/llvm-project/commit/a244194f73788de6dfd6d753ff09be3625613f9f that shows it (and set the C status page back to Partial in case this takes a while to address), but `case` and `default` labels should be accepted the same as any other label at the end of a compound statement.
>
> Btw, when working on C standards features, I've started adding test coverage that demonstrates we fully implement the paper into the `clang/test/C/` directory, under the correct standard version. This helps us to track the status of proposals a bit more easily within the code base.

Hi! Thanks for this information! How did you find out that we should accept labels at end of statement in **C**, but not in **C++**? That is not obvious for me unfortunately. If C supports it, why would C++ not support it?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133887



More information about the cfe-commits mailing list