Skip to content

[clang][doc] Document C2y flags #138521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2025
Merged

[clang][doc] Document C2y flags #138521

merged 1 commit into from
May 6, 2025

Conversation

tambry
Copy link
Contributor

@tambry tambry commented May 5, 2025

As discussed at #138459 (comment)

@tambry tambry requested a review from AaronBallman May 5, 2025 12:37
@tambry tambry self-assigned this May 5, 2025
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels May 5, 2025
@llvmbot
Copy link
Member

llvmbot commented May 5, 2025

@llvm/pr-subscribers-clang

Author: Raul Tambre (tambry)

Changes

As discussed at #138459 (comment)


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 --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",

Copy link
Collaborator

@AaronBallman AaronBallman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tambry tambry merged commit d66dbd6 into llvm:main May 6, 2025
15 checks passed
@tambry tambry deleted the c2y_doc branch May 6, 2025 12:27
GeorgeARM pushed a commit to GeorgeARM/llvm-project that referenced this pull request May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants