[clang] [Clang] Ignore -fchar8_t in C (PR #138716)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed May 7 04:10:13 PDT 2025


================
@@ -5,6 +5,7 @@
 // RUN: %clang_cc1 -std=c++17 -verify %s
 // RUN: %clang_cc1 -std=c++17 -verify %s -fno-char8_t
 // RUN: %clang_cc1 -std=c++20 -verify %s -fno-char8_t
+// RUN: %clang_cc1 -x c -verify %s -fchar8_t
----------------
AaronBallman wrote:

CC @jansvoboda11 @MaskRay for more opinions as driver and options maintainers.

I guess I find that behavior kind of surprising. I would expect "you passed this flag and this flag does nothing" should at least be a warning. It's a bit different from an unknown flag, but the same general logic applies: the user passed something and we either know about it and explicitly don't do anything with it, or we don't know about it and don't do anything with it, but either way it seems like the user should be told "this was unknown".

https://github.com/llvm/llvm-project/pull/138716


More information about the cfe-commits mailing list