[clang] [clang][doc] Document C2y flags (PR #138521)
via cfe-commits
cfe-commits at lists.llvm.org
Mon May 5 05:38:13 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Raul Tambre (tambry)
<details>
<summary>Changes</summary>
As discussed at https://github.com/llvm/llvm-project/pull/138459#issuecomment-2850716184
---
Full diff: https://github.com/llvm/llvm-project/pull/138521.diff
2 Files Affected:
- (modified) clang/docs/CommandGuide/clang.rst (+8)
- (modified) clang/include/clang/Basic/LangStandards.def (+1-1)
``````````diff
diff --git a/clang/docs/CommandGuide/clang.rst b/clang/docs/CommandGuide/clang.rst
index e3399d39bf00c..1b8776c5e9ad2 100644
--- a/clang/docs/CommandGuide/clang.rst
+++ b/clang/docs/CommandGuide/clang.rst
@@ -155,6 +155,14 @@ Language Selection and Mode Options
ISO C 2023 with GNU extensions
+ | ``c2y``
+
+ ISO C 202y
+
+ | ``gnu2y``
+
+ ISO C 202y with GNU extensions
+
The default C language standard is ``gnu17``, except on PS4, where it is
``gnu99``.
diff --git a/clang/include/clang/Basic/LangStandards.def b/clang/include/clang/Basic/LangStandards.def
index 49cd9881829d4..244692ab4296a 100644
--- a/clang/include/clang/Basic/LangStandards.def
+++ b/clang/include/clang/Basic/LangStandards.def
@@ -105,7 +105,7 @@ LANGSTANDARD(c2y, "c2y",
LANGSTANDARD(gnu2y, "gnu2y",
C, "Working Draft for ISO C2y with GNU extensions",
LineComment | C99 | C11 | C17 | C23 | C2y | Digraphs | GNUMode | HexFloat)
-
+// TODO: Add the iso9899:202y alias once ISO publishes the standard.
// C++ modes
LANGSTANDARD(cxx98, "c++98",
``````````
</details>
https://github.com/llvm/llvm-project/pull/138521
More information about the cfe-commits
mailing list