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

Evgeny Shulgin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 17 06:57:56 PDT 2022


Izaron added a comment.

> Why checking getLangOpts().C99 instead of just C

There is no `getLangOpts().C`. Here are possible C/C++ opt flags:
https://github.com/llvm/llvm-project/blob/7914e53e312074828293356f569d190ac6eae3bd/clang/include/clang/Basic/LangOptions.def#L86-L100
I have no understanding why there is no `getLangOpts().C` flag. Maybe the C89 standard is a subset of all other C/C++/ObjC standards, so we don't need the flag?..

> Whyt no compatibility warning in C23 mode

@aaron.ballman said so in https://reviews.llvm.org/D133887#3793027

  It should definitely be without warning in C23 mode and give an extension warning in earlier modes.

I don't know much about extension/incompatible warnings policy (when to apply and not apply them), could you please help me to figure this out with Aaron? 😃


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