aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2023-11-07 14:19:36 +0000
committerJoseph Myers <joseph@codesourcery.com>2023-11-07 14:20:30 +0000
commit094a609c69e5608311a39ff66eb646ca3be70652 (patch)
tree075a2dbb50cfd7aa7d20d36a5d91ffd92a2e5995 /gcc/c-family
parentbeb1e2bf1bd4b7c8fc8d3dd450667344ae8e0aca (diff)
downloadgcc-094a609c69e5608311a39ff66eb646ca3be70652.zip
gcc-094a609c69e5608311a39ff66eb646ca3be70652.tar.gz
gcc-094a609c69e5608311a39ff66eb646ca3be70652.tar.bz2
c: Refer more consistently to C23 not C2X
Continuing the move to refer to C23 in place of C2X throughout the source tree, update documentation, diagnostics, comments, variable and function names, etc., to use the C23 name. Testsuite updates are left for a future patch, except for testcases that test diagnostics that previously mentioned C2X (but in those testcases, sometimes other comments are updated, not just the diagnostic expectations). Bootstrapped with no regressions for x86_64-pc-linux-gnu. gcc/ * builtins.def (DEF_C2X_BUILTIN): Rename to DEF_C23_BUILTIN and use flag_isoc23 and function_c23_misc. * config/rl78/rl78.cc (rl78_option_override): Compare lang_hooks.name with "GNU C23" not "GNU C2X". * coretypes.h (function_c2x_misc): Rename to function_c23_misc. * doc/cpp.texi (@code{__has_attribute}): Refer to C23 instead of C2x. * doc/extend.texi: Likewise. * doc/invoke.texi: Likewise. * dwarf2out.cc (highest_c_language, gen_compile_unit_die): Compare against and return "GNU C23" language string instead of "GNU C2X". * ginclude/float.h: Refer to C23 instead of C2X in comments. * ginclude/stdint-gcc.h: Likewise. * glimits.h: Likewise. * tree.h: Likewise. gcc/ada/ * gcc-interface/utils.cc (flag_isoc2x): Rename to flag_isoc23. gcc/c-family/ * c-common.cc (flag_isoc2x): Rename to flag_isoc23. (c_common_reswords): Use D_C23 instead of D_C2X. * c-common.h: Refer throughout to C23 instead of C2X in comments. (D_C2X): Rename to D_C23. (flag_isoc2x): Rename to flag_isoc23. * c-cppbuiltin.cc (builtin_define_float_constants): Use flag_isoc23 instead of flag_isoc2x. Refer to C23 instead of C2x in comments. * c-format.cc: Use STD_C23 instead of STD_C2X and flag_isoc23 instead of flag_isoc2x. Refer to C23 instead of C2X in comments. * c-format.h: Use STD_C23 instead of STD_C2X. * c-lex.cc: Use warn_c11_c23_compat instead of warn_c11_c2x_compat and flag_isoc23 instead of flag_isoc2x. Refer to C23 instead of C2X in diagnostics. * c-opts.cc: Use flag_isoc23 instead of flag_isoc2x. Refer to C23 instead of C2X in comments. (set_std_c2x): Rename to set_std_c23. * c.opt (Wc11-c23-compat): Use CPP(cpp_warn_c11_c23_compat) CppReason(CPP_W_C11_C23_COMPAT) Var(warn_c11_c23_compat) instead of CPP(cpp_warn_c11_c2x_compat) CppReason(CPP_W_C11_C2X_COMPAT) Var(warn_c11_c2x_compat). gcc/c/ * c-decl.cc: Use flag_isoc23 instead of flag_isoc2x and c23_auto_p instead of c2x_auto_p. Refer to C23 instead of C2X in diagnostics and comments. * c-errors.cc: Use flag_isoc23 instead of flag_isoc2x and warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23 instead of C2X in comments. * c-parser.cc: Use flag_isoc23 instead of flag_isoc2x, warn_c11_c23_compat instead of warn_c11_c2x_compat, c23_auto_p instead of c2x_auto_p and D_C23 instead of D_C2X. Refer to C23 instead of C2X in diagnostics and comments. * c-tree.h: Refer to C23 instead of C2X in comments. (struct c_declspecs): Rename c2x_auto_p to c23_auto_p. * c-typeck.cc: Use flag_isoc23 instead of flag_isoc2x and warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23 instead of C2X in diagnostics and comments. gcc/fortran/ * gfortran.h (gfc_real_info): Refer to C23 instead of C2X in comment. gcc/lto/ * lto-lang.cc (flag_isoc2x): Rename to flag_isoc23. gcc/testsuite/ * gcc.dg/binary-constants-2.c: Refer to C23 instead of C2X. * gcc.dg/binary-constants-3.c: Likewise. * gcc.dg/bitint-23.c: Likewise. * gcc.dg/bitint-26.c: Likewise. * gcc.dg/bitint-27.c: Likewise. * gcc.dg/c11-attr-syntax-1.c: Likewise. * gcc.dg/c11-attr-syntax-2.c: Likewise. * gcc.dg/c11-floatn-1.c: Likewise. * gcc.dg/c11-floatn-2.c: Likewise. * gcc.dg/c11-floatn-3.c: Likewise. * gcc.dg/c11-floatn-4.c: Likewise. * gcc.dg/c11-floatn-5.c: Likewise. * gcc.dg/c11-floatn-6.c: Likewise. * gcc.dg/c11-floatn-7.c: Likewise. * gcc.dg/c11-floatn-8.c: Likewise. * gcc.dg/c2x-attr-syntax-4.c: Likewise. * gcc.dg/c2x-attr-syntax-6.c: Likewise. * gcc.dg/c2x-attr-syntax-7.c: Likewise. * gcc.dg/c2x-binary-constants-2.c: Likewise. * gcc.dg/c2x-floatn-5.c: Likewise. * gcc.dg/c2x-floatn-6.c: Likewise. * gcc.dg/c2x-floatn-7.c: Likewise. * gcc.dg/c2x-floatn-8.c: Likewise. * gcc.dg/c2x-nullptr-4.c: Likewise. * gcc.dg/c2x-qual-2.c: Likewise. * gcc.dg/c2x-qual-3.c: Likewise. * gcc.dg/c2x-qual-6.c: Likewise. * gcc.dg/cpp/c11-warning-1.c: Likewise. * gcc.dg/cpp/c11-warning-2.c: Likewise. * gcc.dg/cpp/c11-warning-3.c: Likewise. * gcc.dg/cpp/c2x-warning-2.c: Likewise. * gcc.dg/cpp/gnu11-elifdef-3.c: Likewise. * gcc.dg/cpp/gnu11-elifdef-4.c: Likewise. * gcc.dg/cpp/gnu11-warning-1.c: Likewise. * gcc.dg/cpp/gnu11-warning-2.c: Likewise. * gcc.dg/cpp/gnu11-warning-3.c: Likewise. * gcc.dg/cpp/gnu2x-warning-2.c: Likewise. * gcc.dg/dfp/c11-constants-1.c: Likewise. * gcc.dg/dfp/c11-constants-2.c: Likewise. * gcc.dg/dfp/c2x-constants-2.c: Likewise. * gcc.dg/dfp/constants-pedantic.c: Likewise. * gcc.dg/pr30260.c: Likewise. * gcc.dg/system-binary-constants-1.c: Likewise. libcpp/ * directives.cc: Refer to C23 instead of C2X in diagnostics and comments. (STDC2X): Rename to STDC23. * expr.cc: Use cpp_warn_c11_c23_compat instead of cpp_warn_c11_c2x_compat and CPP_W_C11_C23_COMPAT instead of CPP_W_C11_C2X_COMPAT. Refer to C23 instead of C2X in diagnostics and comments. * include/cpplib.h: Refer to C23 instead of C2X in diagnostics and comments. (CLK_GNUC2X): Rename to CLK_GNUC23. (CLK_STDC2X): Rename to CLK_STDC23. (CPP_W_C11_C2X_COMPAT): Rename to CPP_W_C11_C23_COMPAT. * init.cc: Use GNUC23 instead of GNUC2X, STDC23 instead of STDC2X and cpp_warn_c11_c23_compat instead of cpp_warn_c11_c2x_compat. * lex.cc (maybe_va_opt_error): Refer to C23 instead of C2X in diagnostic. * macro.cc (_cpp_arguments_ok): Refer to C23 instead of C2X in comment.
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/c-common.cc32
-rw-r--r--gcc/c-family/c-common.h12
-rw-r--r--gcc/c-family/c-cppbuiltin.cc4
-rw-r--r--gcc/c-family/c-format.cc56
-rw-r--r--gcc/c-family/c-format.h58
-rw-r--r--gcc/c-family/c-lex.cc14
-rw-r--r--gcc/c-family/c-opts.cc34
-rw-r--r--gcc/c-family/c.opt2
8 files changed, 106 insertions, 106 deletions
diff --git a/gcc/c-family/c-common.cc b/gcc/c-family/c-common.cc
index b250694..77faf17 100644
--- a/gcc/c-family/c-common.cc
+++ b/gcc/c-family/c-common.cc
@@ -224,9 +224,9 @@ int flag_isoc99;
int flag_isoc11;
-/* Nonzero means use the ISO C2X dialect of C. */
+/* Nonzero means use the ISO C23 dialect of C. */
-int flag_isoc2x;
+int flag_isoc23;
/* Nonzero means that we have builtin functions, and main is an int. */
@@ -324,10 +324,10 @@ static bool nonnull_check_p (tree, unsigned HOST_WIDE_INT);
if they match the mask.
Masks for languages:
- C --std=c89: D_C99 | D_C2X | D_CXXONLY | D_OBJC | D_CXX_OBJC
- C --std=c99: D_C2X | D_CXXONLY | D_OBJC
- C --std=c17: D_C2X | D_CXXONLY | D_OBJC
- C --std=c2x: D_CXXONLY | D_OBJC
+ C --std=c89: D_C99 | D_C23 | D_CXXONLY | D_OBJC | D_CXX_OBJC
+ C --std=c99: D_C23 | D_CXXONLY | D_OBJC
+ C --std=c17: D_C23 | D_CXXONLY | D_OBJC
+ C --std=c23: D_CXXONLY | D_OBJC
ObjC is like C except that D_OBJC and D_CXX_OBJC are not set
C++ --std=c++98: D_CONLY | D_CXX11 | D_CXX20 | D_OBJC
C++ --std=c++11: D_CONLY | D_CXX20 | D_OBJC
@@ -428,11 +428,11 @@ const struct c_common_resword c_common_reswords[] =
{ "__GIMPLE", RID_GIMPLE, D_CONLY },
{ "__PHI", RID_PHI, D_CONLY },
{ "__RTL", RID_RTL, D_CONLY },
- { "alignas", RID_ALIGNAS, D_C2X | D_CXX11 | D_CXXWARN },
- { "alignof", RID_ALIGNOF, D_C2X | D_CXX11 | D_CXXWARN },
+ { "alignas", RID_ALIGNAS, D_C23 | D_CXX11 | D_CXXWARN },
+ { "alignof", RID_ALIGNOF, D_C23 | D_CXX11 | D_CXXWARN },
{ "asm", RID_ASM, D_ASM },
{ "auto", RID_AUTO, 0 },
- { "bool", RID_BOOL, D_C2X | D_CXXWARN },
+ { "bool", RID_BOOL, D_C23 | D_CXXWARN },
{ "break", RID_BREAK, 0 },
{ "case", RID_CASE, 0 },
{ "catch", RID_CATCH, D_CXX_OBJC | D_CXXWARN },
@@ -443,7 +443,7 @@ const struct c_common_resword c_common_reswords[] =
{ "class", RID_CLASS, D_CXX_OBJC | D_CXXWARN },
{ "const", RID_CONST, 0 },
{ "consteval", RID_CONSTEVAL, D_CXXONLY | D_CXX20 | D_CXXWARN },
- { "constexpr", RID_CONSTEXPR, D_C2X | D_CXX11 | D_CXXWARN },
+ { "constexpr", RID_CONSTEXPR, D_C23 | D_CXX11 | D_CXXWARN },
{ "constinit", RID_CONSTINIT, D_CXXONLY | D_CXX20 | D_CXXWARN },
{ "const_cast", RID_CONSTCAST, D_CXXONLY | D_CXXWARN },
{ "continue", RID_CONTINUE, 0 },
@@ -458,7 +458,7 @@ const struct c_common_resword c_common_reswords[] =
{ "explicit", RID_EXPLICIT, D_CXXONLY | D_CXXWARN },
{ "export", RID_EXPORT, D_CXXONLY | D_CXXWARN },
{ "extern", RID_EXTERN, 0 },
- { "false", RID_FALSE, D_C2X | D_CXXWARN },
+ { "false", RID_FALSE, D_C23 | D_CXXWARN },
{ "float", RID_FLOAT, 0 },
{ "for", RID_FOR, 0 },
{ "friend", RID_FRIEND, D_CXXONLY | D_CXXWARN },
@@ -471,7 +471,7 @@ const struct c_common_resword c_common_reswords[] =
{ "namespace", RID_NAMESPACE, D_CXXONLY | D_CXXWARN },
{ "new", RID_NEW, D_CXXONLY | D_CXXWARN },
{ "noexcept", RID_NOEXCEPT, D_CXXONLY | D_CXX11 | D_CXXWARN },
- { "nullptr", RID_NULLPTR, D_C2X | D_CXX11 | D_CXXWARN },
+ { "nullptr", RID_NULLPTR, D_C23 | D_CXX11 | D_CXXWARN },
{ "operator", RID_OPERATOR, D_CXXONLY | D_CXXWARN },
{ "private", RID_PRIVATE, D_CXX_OBJC | D_CXXWARN },
{ "protected", RID_PROTECTED, D_CXX_OBJC | D_CXXWARN },
@@ -484,21 +484,21 @@ const struct c_common_resword c_common_reswords[] =
{ "signed", RID_SIGNED, 0 },
{ "sizeof", RID_SIZEOF, 0 },
{ "static", RID_STATIC, 0 },
- { "static_assert", RID_STATIC_ASSERT, D_C2X | D_CXX11 | D_CXXWARN },
+ { "static_assert", RID_STATIC_ASSERT, D_C23 | D_CXX11 | D_CXXWARN },
{ "static_cast", RID_STATCAST, D_CXXONLY | D_CXXWARN },
{ "struct", RID_STRUCT, 0 },
{ "switch", RID_SWITCH, 0 },
{ "template", RID_TEMPLATE, D_CXXONLY | D_CXXWARN },
{ "this", RID_THIS, D_CXXONLY | D_CXXWARN },
- { "thread_local", RID_THREAD, D_C2X | D_CXX11 | D_CXXWARN },
+ { "thread_local", RID_THREAD, D_C23 | D_CXX11 | D_CXXWARN },
{ "throw", RID_THROW, D_CXX_OBJC | D_CXXWARN },
- { "true", RID_TRUE, D_C2X | D_CXXWARN },
+ { "true", RID_TRUE, D_C23 | D_CXXWARN },
{ "try", RID_TRY, D_CXX_OBJC | D_CXXWARN },
{ "typedef", RID_TYPEDEF, 0 },
{ "typename", RID_TYPENAME, D_CXXONLY | D_CXXWARN },
{ "typeid", RID_TYPEID, D_CXXONLY | D_CXXWARN },
{ "typeof", RID_TYPEOF, D_EXT11 },
- { "typeof_unqual", RID_TYPEOF_UNQUAL, D_CONLY | D_C2X },
+ { "typeof_unqual", RID_TYPEOF_UNQUAL, D_CONLY | D_C23 },
{ "union", RID_UNION, 0 },
{ "unsigned", RID_UNSIGNED, 0 },
{ "using", RID_USING, D_CXXONLY | D_CXXWARN },
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index 1fdba7e..b57e83d 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -435,11 +435,11 @@ extern machine_mode c_default_pointer_mode;
#define D_CONLY 0x0001 /* C only (not in C++). */
#define D_CXXONLY 0x0002 /* C++ only (not in C). */
#define D_C99 0x0004 /* In C, C99 only. */
-#define D_C2X 0x0008 /* In C, C2X only. */
+#define D_C23 0x0008 /* In C, C23 only. */
#define D_CXX11 0x0010 /* In C++, C++11 only. */
#define D_EXT 0x0020 /* GCC extension. */
#define D_EXT89 0x0040 /* GCC extension incorporated in C99. */
-#define D_EXT11 0x0080 /* GCC extension incorporated in C2X. */
+#define D_EXT11 0x0080 /* GCC extension incorporated in C23. */
#define D_ASM 0x0100 /* Disabled by -fno-asm. */
#define D_OBJC 0x0200 /* In Objective C and neither C nor C++. */
#define D_CXX_OBJC 0x0400 /* In Objective C, and C++, but not C. */
@@ -536,7 +536,7 @@ extern GTY(()) tree c_global_trees[CTI_MAX];
enum c_language_kind
{
- clk_c = 0, /* C90, C94, C99, C11 or C2X */
+ clk_c = 0, /* C90, C94, C99, C11 or C23 */
clk_objc = 1, /* clk_c with ObjC features. */
clk_cxx = 2, /* ANSI/ISO C++ */
clk_objcxx = 3 /* clk_cxx with ObjC features. */
@@ -681,9 +681,9 @@ extern int flag_isoc99;
extern int flag_isoc11;
-/* Nonzero means use the ISO C2X dialect of C. */
+/* Nonzero means use the ISO C23 dialect of C. */
-extern int flag_isoc2x;
+extern int flag_isoc23;
/* Nonzero means that we have builtin functions, and main is an int. */
@@ -1038,7 +1038,7 @@ extern void c_init_preprocess (void);
underlying type is determined in different ways, depending on the
properties of the enum:
- - In C++0x or C2x, the underlying type can be explicitly specified, e.g.,
+ - In C++0x or C23, the underlying type can be explicitly specified, e.g.,
enum E1 : char { ... } // underlying type is char
diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc
index 8904ac8..e48b5b4 100644
--- a/gcc/c-family/c-cppbuiltin.cc
+++ b/gcc/c-family/c-cppbuiltin.cc
@@ -279,7 +279,7 @@ builtin_define_float_constants (const char *name_prefix,
/* The difference between 1 and the least value greater than 1 that is
representable in the given floating point type, b**(1-p). */
sprintf (name, "__%s_EPSILON__", name_prefix);
- if (fmt->pnan < fmt->p && (c_dialect_cxx () || !flag_isoc2x))
+ if (fmt->pnan < fmt->p && (c_dialect_cxx () || !flag_isoc23))
/* This is an IBM extended double format, so 1.0 + any double is
representable precisely. */
sprintf (buf, "0x1p%d", fmt->emin - fmt->p);
@@ -318,7 +318,7 @@ builtin_define_float_constants (const char *name_prefix,
builtin_define_with_int_value (name, 1);
}
- /* For C2x *_IS_IEC_60559. 0 means the type does not match an IEC
+ /* For C23 *_IS_IEC_60559. 0 means the type does not match an IEC
60559 format, 1 that it matches a format but not necessarily
operations. */
sprintf (name, "__%s_IS_IEC_60559__", name_prefix);
diff --git a/gcc/c-family/c-format.cc b/gcc/c-family/c-format.cc
index b9906ec..06c84d0 100644
--- a/gcc/c-family/c-format.cc
+++ b/gcc/c-family/c-format.cc
@@ -398,8 +398,8 @@ decode_format_attr (const_tree fn, tree atname, tree args,
/* The C standard version we are checking formats against when pedantic. */
#define C_STD_VER ((int) (c_dialect_cxx () \
? CPLUSPLUS_STD_VER \
- : (flag_isoc2x \
- ? STD_C2X \
+ : (flag_isoc23 \
+ ? STD_C23 \
: (flag_isoc99 \
? STD_C99 \
: (flag_isoc94 ? STD_C94 : STD_C89)))))
@@ -411,7 +411,7 @@ decode_format_attr (const_tree fn, tree atname, tree args,
: "ISO C++11") \
: ((FEATURE_VER) == STD_EXT \
? "ISO C" \
- : ((FEATURE_VER) == STD_C2X \
+ : ((FEATURE_VER) == STD_C23 \
? "ISO C17" \
: "ISO C90")))
/* Adjust a C standard version, which may be STD_C9L, to account for
@@ -486,16 +486,16 @@ static const format_length_info printf_length_specs[] =
{ "Z", FMT_LEN_z, STD_EXT, NO_FMT, 0 },
{ "t", FMT_LEN_t, STD_C99, NO_FMT, 0 },
{ "j", FMT_LEN_j, STD_C99, NO_FMT, 0 },
- { "H", FMT_LEN_H, STD_C2X, NO_FMT, 0 },
- { "D", FMT_LEN_D, STD_C2X, "DD", FMT_LEN_DD, STD_C2X, 0 },
- { "w8", FMT_LEN_w8, STD_C2X, NO_FMT, 0 },
- { "w16", FMT_LEN_w16, STD_C2X, NO_FMT, 0 },
- { "w32", FMT_LEN_w32, STD_C2X, NO_FMT, 0 },
- { "w64", FMT_LEN_w64, STD_C2X, NO_FMT, 0 },
- { "wf8", FMT_LEN_wf8, STD_C2X, NO_FMT, 0 },
- { "wf16", FMT_LEN_wf16, STD_C2X, NO_FMT, 0 },
- { "wf32", FMT_LEN_wf32, STD_C2X, NO_FMT, 0 },
- { "wf64", FMT_LEN_wf64, STD_C2X, NO_FMT, 0 },
+ { "H", FMT_LEN_H, STD_C23, NO_FMT, 0 },
+ { "D", FMT_LEN_D, STD_C23, "DD", FMT_LEN_DD, STD_C23, 0 },
+ { "w8", FMT_LEN_w8, STD_C23, NO_FMT, 0 },
+ { "w16", FMT_LEN_w16, STD_C23, NO_FMT, 0 },
+ { "w32", FMT_LEN_w32, STD_C23, NO_FMT, 0 },
+ { "w64", FMT_LEN_w64, STD_C23, NO_FMT, 0 },
+ { "wf8", FMT_LEN_wf8, STD_C23, NO_FMT, 0 },
+ { "wf16", FMT_LEN_wf16, STD_C23, NO_FMT, 0 },
+ { "wf32", FMT_LEN_wf32, STD_C23, NO_FMT, 0 },
+ { "wf64", FMT_LEN_wf64, STD_C23, NO_FMT, 0 },
{ NO_FMT, NO_FMT, 0 }
};
@@ -531,16 +531,16 @@ static const format_length_info scanf_length_specs[] =
{ "z", FMT_LEN_z, STD_C99, NO_FMT, 0 },
{ "t", FMT_LEN_t, STD_C99, NO_FMT, 0 },
{ "j", FMT_LEN_j, STD_C99, NO_FMT, 0 },
- { "H", FMT_LEN_H, STD_C2X, NO_FMT, 0 },
- { "D", FMT_LEN_D, STD_C2X, "DD", FMT_LEN_DD, STD_C2X, 0 },
- { "w8", FMT_LEN_w8, STD_C2X, NO_FMT, 0 },
- { "w16", FMT_LEN_w16, STD_C2X, NO_FMT, 0 },
- { "w32", FMT_LEN_w32, STD_C2X, NO_FMT, 0 },
- { "w64", FMT_LEN_w64, STD_C2X, NO_FMT, 0 },
- { "wf8", FMT_LEN_wf8, STD_C2X, NO_FMT, 0 },
- { "wf16", FMT_LEN_wf16, STD_C2X, NO_FMT, 0 },
- { "wf32", FMT_LEN_wf32, STD_C2X, NO_FMT, 0 },
- { "wf64", FMT_LEN_wf64, STD_C2X, NO_FMT, 0 },
+ { "H", FMT_LEN_H, STD_C23, NO_FMT, 0 },
+ { "D", FMT_LEN_D, STD_C23, "DD", FMT_LEN_DD, STD_C23, 0 },
+ { "w8", FMT_LEN_w8, STD_C23, NO_FMT, 0 },
+ { "w16", FMT_LEN_w16, STD_C23, NO_FMT, 0 },
+ { "w32", FMT_LEN_w32, STD_C23, NO_FMT, 0 },
+ { "w64", FMT_LEN_w64, STD_C23, NO_FMT, 0 },
+ { "wf8", FMT_LEN_wf8, STD_C23, NO_FMT, 0 },
+ { "wf16", FMT_LEN_wf16, STD_C23, NO_FMT, 0 },
+ { "wf32", FMT_LEN_wf32, STD_C23, NO_FMT, 0 },
+ { "wf64", FMT_LEN_wf64, STD_C23, NO_FMT, 0 },
{ NO_FMT, NO_FMT, 0 }
};
@@ -668,7 +668,7 @@ static const format_flag_spec strftime_flag_specs[] =
{ 'E', 0, 0, 0, N_("'E' modifier"), N_("the 'E' strftime modifier"), STD_C99 },
{ 'O', 0, 0, 0, N_("'O' modifier"), N_("the 'O' strftime modifier"), STD_C99 },
{ 'O', 'o', 0, 0, NULL, N_("the 'O' modifier"), STD_EXT },
- { 'O', 'p', 0, 0, NULL, N_("the 'O' modifier"), STD_C2X },
+ { 'O', 'p', 0, 0, NULL, N_("the 'O' modifier"), STD_C23 },
{ 0, 0, 0, 0, NULL, NULL, STD_C89 }
};
@@ -721,8 +721,8 @@ static const format_char_info print_char_table[] =
/* C99 conversion specifiers. */
{ "F", 0, STD_C99, { T99_D, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN, T2X_D32, T2X_D64, T2X_D128, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0 +#'I", "", NULL },
{ "aA", 0, STD_C99, { T99_D, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN, T2X_D32, T2X_D64, T2X_D128, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0 +#", "", NULL },
- /* C2X conversion specifiers. */
- { "bB", 0, STD_C2X, { T2X_UI, T2X_UC, T2X_US, T2X_UL, T2X_ULL, TEX_ULL, T2X_ST, T2X_UPD, T2X_UIM, BADLEN, BADLEN, BADLEN, T2X_U8, T2X_U16, T2X_U32, T2X_U64, T2X_UF8, T2X_UF16, T2X_UF32, T2X_UF64 }, "-wp0#", "i", NULL },
+ /* C23 conversion specifiers. */
+ { "bB", 0, STD_C23, { T2X_UI, T2X_UC, T2X_US, T2X_UL, T2X_ULL, TEX_ULL, T2X_ST, T2X_UPD, T2X_UIM, BADLEN, BADLEN, BADLEN, T2X_U8, T2X_U16, T2X_U32, T2X_U64, T2X_UF8, T2X_UF16, T2X_UF32, T2X_UF64 }, "-wp0#", "i", NULL },
/* X/Open conversion specifiers. */
{ "C", 0, STD_EXT, { TEX_WI, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL },
{ "S", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "R", NULL },
@@ -887,8 +887,8 @@ static const format_char_info scan_char_table[] =
/* C99 conversion specifiers. */
{ "F", 1, STD_C99, { T99_F, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN, T2X_D32, T2X_D64, T2X_D128, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*w'", "W", NULL },
{ "aA", 1, STD_C99, { T99_F, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN, T2X_D32, T2X_D64, T2X_D128, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*w'", "W", NULL },
- /* C2X conversion specifiers. */
- { "b", 1, STD_C2X, { T2X_UI, T2X_UC, T2X_US, T2X_UL, T2X_ULL, TEX_ULL, T2X_ST, T2X_UPD, T2X_UIM, BADLEN, BADLEN, BADLEN, T2X_U8, T2X_U16, T2X_U32, T2X_U64, T2X_UF8, T2X_UF16, T2X_UF32, T2X_UF64 }, "*w", "W", NULL },
+ /* C23 conversion specifiers. */
+ { "b", 1, STD_C23, { T2X_UI, T2X_UC, T2X_US, T2X_UL, T2X_ULL, TEX_ULL, T2X_ST, T2X_UPD, T2X_UIM, BADLEN, BADLEN, BADLEN, T2X_U8, T2X_U16, T2X_U32, T2X_U64, T2X_UF8, T2X_UF16, T2X_UF32, T2X_UF64 }, "*w", "W", NULL },
/* X/Open conversion specifiers. */
{ "C", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*mw", "W", NULL },
{ "S", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*amw", "W", NULL },
diff --git a/gcc/c-family/c-format.h b/gcc/c-family/c-format.h
index 5f7dde3..37bcbf8 100644
--- a/gcc/c-family/c-format.h
+++ b/gcc/c-family/c-format.h
@@ -56,7 +56,7 @@ enum format_std_version
STD_C94,
STD_C9L, /* C99, but treat as C89 if -Wno-long-long. */
STD_C99,
- STD_C2X,
+ STD_C23,
STD_EXT
};
@@ -158,7 +158,7 @@ struct format_char_info
two digit year formats, "3" for strftime formats giving two digit
years in some locales, "4" for "2" which becomes "3" with an "E" modifier,
"o" if use of strftime "O" is a GNU extension beyond C99,
- "p" if use of strftime "O" is a C2x feature,
+ "p" if use of strftime "O" is a C23 feature,
"W" if the argument is a pointer which is dereferenced and written into,
"R" if the argument is a pointer which is dereferenced and read from,
"i" for printf integer formats where the '0' flag is ignored with
@@ -286,17 +286,17 @@ struct format_kind_info
#define T89_S { STD_C89, NULL, T_S }
#define T_UI &unsigned_type_node
#define T89_UI { STD_C89, NULL, T_UI }
-#define T2X_UI { STD_C2X, NULL, T_UI }
+#define T2X_UI { STD_C23, NULL, T_UI }
#define T_UL &long_unsigned_type_node
#define T89_UL { STD_C89, NULL, T_UL }
-#define T2X_UL { STD_C2X, NULL, T_UL }
+#define T2X_UL { STD_C23, NULL, T_UL }
#define T_ULL &long_long_unsigned_type_node
#define T9L_ULL { STD_C9L, NULL, T_ULL }
-#define T2X_ULL { STD_C2X, NULL, T_ULL }
+#define T2X_ULL { STD_C23, NULL, T_ULL }
#define TEX_ULL { STD_EXT, NULL, T_ULL }
#define T_US &short_unsigned_type_node
#define T89_US { STD_C89, NULL, T_US }
-#define T2X_US { STD_C2X, NULL, T_US }
+#define T2X_US { STD_C23, NULL, T_US }
#define T_F &float_type_node
#define T89_F { STD_C89, NULL, T_F }
#define T99_F { STD_C99, NULL, T_F }
@@ -312,7 +312,7 @@ struct format_kind_info
#define T99_SC { STD_C99, NULL, T_SC }
#define T_UC &unsigned_char_type_node
#define T99_UC { STD_C99, NULL, T_UC }
-#define T2X_UC { STD_C2X, NULL, T_UC }
+#define T2X_UC { STD_C23, NULL, T_UC }
#define T_V &void_type_node
#define T89_G { STD_C89, NULL, &local_gimple_ptr_node }
#define T_CGRAPH_NODE { STD_C89, NULL, &local_cgraph_node_ptr_node }
@@ -327,57 +327,57 @@ struct format_kind_info
#define TEX_WI { STD_EXT, "wint_t", T_WI }
#define T_ST &size_type_node
#define T99_ST { STD_C99, "size_t", T_ST }
-#define T2X_ST { STD_C2X, "size_t", T_ST }
+#define T2X_ST { STD_C23, "size_t", T_ST }
#define T_SST &signed_size_type_node
#define T99_SST { STD_C99, "signed size_t", T_SST }
#define T_PD &ptrdiff_type_node
#define T99_PD { STD_C99, "ptrdiff_t", T_PD }
#define T_UPD &unsigned_ptrdiff_type_node
#define T99_UPD { STD_C99, "unsigned ptrdiff_t", T_UPD }
-#define T2X_UPD { STD_C2X, "unsigned ptrdiff_t", T_UPD }
+#define T2X_UPD { STD_C23, "unsigned ptrdiff_t", T_UPD }
#define T_IM &intmax_type_node
#define T99_IM { STD_C99, "intmax_t", T_IM }
#define T_UIM &uintmax_type_node
#define T99_UIM { STD_C99, "uintmax_t", T_UIM }
-#define T2X_UIM { STD_C2X, "uintmax_t", T_UIM }
+#define T2X_UIM { STD_C23, "uintmax_t", T_UIM }
#define T_D32 &dfloat32_type_node
-#define T2X_D32 { STD_C2X, "_Decimal32", T_D32 }
+#define T2X_D32 { STD_C23, "_Decimal32", T_D32 }
#define T_D64 &dfloat64_type_node
-#define T2X_D64 { STD_C2X, "_Decimal64", T_D64 }
+#define T2X_D64 { STD_C23, "_Decimal64", T_D64 }
#define T_D128 &dfloat128_type_node
-#define T2X_D128 { STD_C2X, "_Decimal128", T_D128 }
+#define T2X_D128 { STD_C23, "_Decimal128", T_D128 }
#define T_I8 &int_least8_type_node
-#define T2X_I8 { STD_C2X, "int_least8_t", T_I8 }
+#define T2X_I8 { STD_C23, "int_least8_t", T_I8 }
#define T_I16 &int_least16_type_node
-#define T2X_I16 { STD_C2X, "int_least16_t", T_I16 }
+#define T2X_I16 { STD_C23, "int_least16_t", T_I16 }
#define T_I32 &int_least32_type_node
-#define T2X_I32 { STD_C2X, "int_least32_t", T_I32 }
+#define T2X_I32 { STD_C23, "int_least32_t", T_I32 }
#define T_I64 &int_least64_type_node
-#define T2X_I64 { STD_C2X, "int_least64_t", T_I64 }
+#define T2X_I64 { STD_C23, "int_least64_t", T_I64 }
#define T_U8 &uint_least8_type_node
-#define T2X_U8 { STD_C2X, "uint_least8_t", T_U8 }
+#define T2X_U8 { STD_C23, "uint_least8_t", T_U8 }
#define T_U16 &uint_least16_type_node
-#define T2X_U16 { STD_C2X, "uint_least16_t", T_U16 }
+#define T2X_U16 { STD_C23, "uint_least16_t", T_U16 }
#define T_U32 &uint_least32_type_node
-#define T2X_U32 { STD_C2X, "uint_least32_t", T_U32 }
+#define T2X_U32 { STD_C23, "uint_least32_t", T_U32 }
#define T_U64 &uint_least64_type_node
-#define T2X_U64 { STD_C2X, "uint_least64_t", T_U64 }
+#define T2X_U64 { STD_C23, "uint_least64_t", T_U64 }
#define T_IF8 &int_fast8_type_node
-#define T2X_IF8 { STD_C2X, "int_fast8_t", T_IF8 }
+#define T2X_IF8 { STD_C23, "int_fast8_t", T_IF8 }
#define T_IF16 &int_fast16_type_node
-#define T2X_IF16 { STD_C2X, "int_fast16_t", T_IF16 }
+#define T2X_IF16 { STD_C23, "int_fast16_t", T_IF16 }
#define T_IF32 &int_fast32_type_node
-#define T2X_IF32 { STD_C2X, "int_fast32_t", T_IF32 }
+#define T2X_IF32 { STD_C23, "int_fast32_t", T_IF32 }
#define T_IF64 &int_fast64_type_node
-#define T2X_IF64 { STD_C2X, "int_fast64_t", T_IF64 }
+#define T2X_IF64 { STD_C23, "int_fast64_t", T_IF64 }
#define T_UF8 &uint_fast8_type_node
-#define T2X_UF8 { STD_C2X, "uint_fast8_t", T_UF8 }
+#define T2X_UF8 { STD_C23, "uint_fast8_t", T_UF8 }
#define T_UF16 &uint_fast16_type_node
-#define T2X_UF16 { STD_C2X, "uint_fast16_t", T_UF16 }
+#define T2X_UF16 { STD_C23, "uint_fast16_t", T_UF16 }
#define T_UF32 &uint_fast32_type_node
-#define T2X_UF32 { STD_C2X, "uint_fast32_t", T_UF32 }
+#define T2X_UF32 { STD_C23, "uint_fast32_t", T_UF32 }
#define T_UF64 &uint_fast64_type_node
-#define T2X_UF64 { STD_C2X, "uint_fast64_t", T_UF64 }
+#define T2X_UF64 { STD_C23, "uint_fast64_t", T_UF64 }
/* Structure describing how format attributes such as "printf" are
interpreted as "gnu_printf" or "ms_printf" on a particular system.
diff --git a/gcc/c-family/c-lex.cc b/gcc/c-family/c-lex.cc
index 969c26c..06c2453 100644
--- a/gcc/c-family/c-lex.cc
+++ b/gcc/c-family/c-lex.cc
@@ -1185,21 +1185,21 @@ interpret_float (const cpp_token *token, unsigned int flags,
}
else if (!c_dialect_cxx ())
{
- if (warn_c11_c2x_compat > 0)
+ if (warn_c11_c23_compat > 0)
{
- if (pedantic && !flag_isoc2x)
+ if (pedantic && !flag_isoc23)
pedwarn (input_location, OPT_Wc11_c23_compat,
"non-standard suffix on floating constant "
- "before C2X");
+ "before C23");
else
warning (OPT_Wc11_c23_compat,
"non-standard suffix on floating constant "
- "before C2X");
+ "before C23");
}
- else if (warn_c11_c2x_compat != 0 && pedantic && !flag_isoc2x)
+ else if (warn_c11_c23_compat != 0 && pedantic && !flag_isoc23)
pedwarn (input_location, OPT_Wpedantic,
"non-standard suffix on floating constant "
- "before C2X");
+ "before C23");
}
else if (!extended)
{
@@ -1271,7 +1271,7 @@ interpret_float (const cpp_token *token, unsigned int flags,
}
copy = (char *) alloca (copylen + 1);
- if (c_dialect_cxx () ? cxx_dialect > cxx11 : flag_isoc2x)
+ if (c_dialect_cxx () ? cxx_dialect > cxx11 : flag_isoc23)
{
size_t maxlen = 0;
for (size_t i = 0; i < copylen; ++i)
diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc
index 87da6c1..d30d413 100644
--- a/gcc/c-family/c-opts.cc
+++ b/gcc/c-family/c-opts.cc
@@ -119,7 +119,7 @@ static void set_std_c89 (int, int);
static void set_std_c99 (int);
static void set_std_c11 (int);
static void set_std_c17 (int);
-static void set_std_c2x (int);
+static void set_std_c23 (int);
static void check_deps_environment_vars (void);
static void handle_deferred_opts (void);
static void sanitize_cpp_opts (void);
@@ -734,12 +734,12 @@ c_common_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
case OPT_std_c23:
if (!preprocessing_asm_p)
- set_std_c2x (true /* ISO */);
+ set_std_c23 (true /* ISO */);
break;
case OPT_std_gnu23:
if (!preprocessing_asm_p)
- set_std_c2x (false /* ISO */);
+ set_std_c23 (false /* ISO */);
break;
case OPT_trigraphs:
@@ -866,9 +866,9 @@ c_common_post_options (const char **pfilename)
else
flag_permitted_flt_eval_methods = PERMITTED_FLT_EVAL_METHODS_C11;
- /* C2X Annex F does not permit certain built-in functions to raise
+ /* C23 Annex F does not permit certain built-in functions to raise
"inexact". */
- if (flag_isoc2x)
+ if (flag_isoc23)
SET_OPTION_IF_UNSET (&global_options, &global_options_set,
flag_fp_int_builtin_inexact, 0);
@@ -944,9 +944,9 @@ c_common_post_options (const char **pfilename)
if (warn_implicit_int == -1)
warn_implicit_int = flag_isoc99;
- /* -Wold-style-definition is enabled by default for C2X. */
+ /* -Wold-style-definition is enabled by default for C23. */
if (warn_old_style_definition == -1)
- warn_old_style_definition = flag_isoc2x;
+ warn_old_style_definition = flag_isoc23;
/* -Wshift-overflow is enabled by default in C99 and C++11 modes. */
if (warn_shift_overflow == -1)
@@ -1092,9 +1092,9 @@ c_common_post_options (const char **pfilename)
if (warn_invalid_constexpr == -1)
warn_invalid_constexpr = (cxx_dialect < cxx23);
- /* char8_t support is implicitly enabled in C++20 and C2X. */
+ /* char8_t support is implicitly enabled in C++20 and C23. */
if (flag_char8_t == -1)
- flag_char8_t = (cxx_dialect >= cxx20) || flag_isoc2x;
+ flag_char8_t = (cxx_dialect >= cxx20) || flag_isoc23;
cpp_opts->unsigned_utf8char = flag_char8_t ? 1 : cpp_opts->unsigned_char;
if (flag_extern_tls_init)
@@ -1710,7 +1710,7 @@ set_std_c89 (int c94, int iso)
flag_isoc94 = c94;
flag_isoc99 = 0;
flag_isoc11 = 0;
- flag_isoc2x = 0;
+ flag_isoc23 = 0;
lang_hooks.name = "GNU C89";
}
@@ -1722,7 +1722,7 @@ set_std_c99 (int iso)
flag_no_asm = iso;
flag_no_nonansi_builtin = iso;
flag_iso = iso;
- flag_isoc2x = 0;
+ flag_isoc23 = 0;
flag_isoc11 = 0;
flag_isoc99 = 1;
flag_isoc94 = 1;
@@ -1737,7 +1737,7 @@ set_std_c11 (int iso)
flag_no_asm = iso;
flag_no_nonansi_builtin = iso;
flag_iso = iso;
- flag_isoc2x = 0;
+ flag_isoc23 = 0;
flag_isoc11 = 1;
flag_isoc99 = 1;
flag_isoc94 = 1;
@@ -1752,7 +1752,7 @@ set_std_c17 (int iso)
flag_no_asm = iso;
flag_no_nonansi_builtin = iso;
flag_iso = iso;
- flag_isoc2x = 0;
+ flag_isoc23 = 0;
flag_isoc11 = 1;
flag_isoc99 = 1;
flag_isoc94 = 1;
@@ -1761,17 +1761,17 @@ set_std_c17 (int iso)
/* Set the C 2X standard (without GNU extensions if ISO). */
static void
-set_std_c2x (int iso)
+set_std_c23 (int iso)
{
- cpp_set_lang (parse_in, iso ? CLK_STDC2X: CLK_GNUC2X);
+ cpp_set_lang (parse_in, iso ? CLK_STDC23: CLK_GNUC23);
flag_no_asm = iso;
flag_no_nonansi_builtin = iso;
flag_iso = iso;
- flag_isoc2x = 1;
+ flag_isoc23 = 1;
flag_isoc11 = 1;
flag_isoc99 = 1;
flag_isoc94 = 1;
- lang_hooks.name = "GNU C2X";
+ lang_hooks.name = "GNU C23";
}
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 359f071..26f629fb 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -434,7 +434,7 @@ C ObjC C++ ObjC++ CPP(warn_builtin_macro_redefined) CppReason(CPP_W_BUILTIN_MACR
Warn when a built-in preprocessor macro is undefined or redefined.
Wc11-c23-compat
-C ObjC CPP(cpp_warn_c11_c2x_compat) CppReason(CPP_W_C11_C2X_COMPAT) Var(warn_c11_c2x_compat) Init(-1) Warning
+C ObjC CPP(cpp_warn_c11_c23_compat) CppReason(CPP_W_C11_C23_COMPAT) Var(warn_c11_c23_compat) Init(-1) Warning
Warn about features not present in ISO C11, but present in ISO C23.
Wc11-c2x-compat