diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst index be80751b40668..56c277983a740 100644 --- a/clang/docs/LanguageExtensions.rst +++ b/clang/docs/LanguageExtensions.rst @@ -612,7 +612,7 @@ to perform additional operations on certain scalar and vector types. Let ``T`` be one of the following types: -* an integer type (as in C2x 6.2.5p19), but excluding enumerated types and _Bool +* an integer type (as in C23 6.2.5p22), but excluding enumerated types and ``bool`` * the standard floating types float or double * a half-precision floating point type, if one is supported on the target * a vector type. @@ -1462,8 +1462,8 @@ Conditional ``explicit`` __cpp_conditional_explicit C++20 ``static operator()`` __cpp_static_call_operator C++23 C++03 -------------------------------------- -------------------------------- ------------- ------------- Designated initializers (N494) C99 C89 -Array & element qualification (N2607) C2x C89 -Attributes (N2335) C2x C89 +Array & element qualification (N2607) C23 C89 +Attributes (N2335) C23 C89 ====================================== ================================ ============= ============= Type Trait Primitives @@ -3669,7 +3669,7 @@ A predefined typedef for the target-specific ``va_list`` type. A builtin function for the target-specific ``va_start`` function-like macro. The ``parameter-name`` argument is the name of the parameter preceding the -ellipsis (``...``) in the function signature. Alternatively, in C2x mode or +ellipsis (``...``) in the function signature. Alternatively, in C23 mode or later, it may be the integer literal ``0`` if there is no parameter preceding the ellipsis. This function initializes the given ``__builtin_va_list`` object. It is undefined behavior to call this function on an already initialized diff --git a/clang/docs/MatrixTypes.rst b/clang/docs/MatrixTypes.rst index 2efebbfad9381..e32e13b73aba6 100644 --- a/clang/docs/MatrixTypes.rst +++ b/clang/docs/MatrixTypes.rst @@ -33,7 +33,7 @@ program is ill-formed. Currently, the element type of a matrix is only permitted to be one of the following types: -* an integer type (as in C2x 6.2.5p19), but excluding enumerated types and ``_Bool`` +* an integer type (as in C23 6.2.5p22), but excluding enumerated types and ``bool`` * the standard floating types ``float`` or ``double`` * a half-precision floating point type, if one is supported on the target @@ -68,7 +68,7 @@ rows and columns are the same and the value's elements can be converted to the element type of the result type. The result is a matrix where each element is the converted corresponding element. -A value of any real type (as in C2x 6.2.5p17) can be converted to a matrix type +A value of any real type (as in C23 6.2.5p14) can be converted to a matrix type if it can be converted to the element type of the matrix. The result is a matrix where all elements are the converted original value. diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 8d15845625b88..c438db074a19b 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -96,7 +96,7 @@ C Language Changes constant expressions. This change is more consistent with the behavior of GCC. -C2x Feature Support +C23 Feature Support ^^^^^^^^^^^^^^^^^^^ - Clang now accepts ``-std=c23`` and ``-std=gnu23`` as language standard modes, and the ``__STDC_VERSION__`` macro now expands to ``202311L`` instead of its diff --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst index a774fd91aa277..558e205d69c2a 100644 --- a/clang/docs/UsersManual.rst +++ b/clang/docs/UsersManual.rst @@ -3172,7 +3172,7 @@ Differences between various standard modes clang supports the -std option, which changes what language mode clang uses. The supported modes for C are c89, gnu89, c94, c99, gnu99, c11, gnu11, c17, -gnu17, c2x, gnu2x, and various aliases for those modes. If no -std option is +gnu17, c23, gnu23, and various aliases for those modes. If no -std option is specified, clang defaults to gnu17 mode. Many C99 and C11 features are supported in earlier modes as a conforming extension, with a warning. Use ``-pedantic-errors`` to request an error if a feature from a later standard @@ -3224,6 +3224,19 @@ Differences between ``*11`` and ``*17`` modes: - ``__STDC_VERSION__`` is defined to ``201710L`` rather than ``201112L``. +Differences between ``*17`` and ``*23`` modes: + +- ``__STDC_VERSION__`` is defined to ``202311L`` rather than ``201710L``. +- ``nullptr`` and ``nullptr_t`` are supported, only in ``*23`` mode. +- ``ATOMIC_VAR_INIT`` is removed from ``*23`` mode. +- ``bool``, ``true``, ``false``, ``alignas``, ``alignof``, ``static_assert``, + and ``thread_local` are now first-class keywords, only in ``*23`` mode. +- ``typeof`` and ``typeof_unqual`` are supported, only ``*23`` mode. +- Bit-precise integers (``_BitInt(N)``) are supported by default in ``*23`` + mode, and as an extension in ``*17`` and earlier modes. +- ``[[]]`` attributes are supported by default in ``*23`` mode, and as an + extension in ``*17`` and earlier modes. + GCC extensions not implemented yet ----------------------------------