From: Jason Merrill Date: Wed, 13 May 2020 19:15:13 +0000 (-0400) Subject: c++: Replace "C++2a" with "C++20". X-Git-Tag: upstream/12.2.0~16588 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b04445d4a809eaf0460fd4f1f35b1a7d458c8c72;p=platform%2Fupstream%2Fgcc.git c++: Replace "C++2a" with "C++20". C++20 isn't final quite yet, but all that remains is formalities, so let's go ahead and change all the references. I think for the next C++ standard we can just call it C++23 rather than C++2b, since the committee has been consistent about time-based releases rather than feature-based. gcc/c-family/ChangeLog 2020-05-13 Jason Merrill * c.opt (std=c++20): Make c++2a the alias. (std=gnu++20): Likewise. * c-common.h (cxx_dialect): Change cxx2a to cxx20. * c-opts.c: Adjust. * c-cppbuiltin.c: Adjust. * c-ubsan.c: Adjust. * c-warn.c: Adjust. gcc/cp/ChangeLog 2020-05-13 Jason Merrill * call.c, class.c, constexpr.c, constraint.cc, decl.c, init.c, lambda.c, lex.c, method.c, name-lookup.c, parser.c, pt.c, tree.c, typeck2.c: Change cxx2a to cxx20. libcpp/ChangeLog 2020-05-13 Jason Merrill * include/cpplib.h (enum c_lang): Change CXX2A to CXX20. * init.c, lex.c: Adjust. --- diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 0be10ad..7bd78c0 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,13 @@ +2020-05-13 Jason Merrill + + * c.opt (std=c++20): Make c++2a the alias. + (std=gnu++20): Likewise. + * c-common.h (cxx_dialect): Change cxx2a to cxx20. + * c-opts.c: Adjust. + * c-cppbuiltin.c: Adjust. + * c-ubsan.c: Adjust. + * c-warn.c: Adjust. + 2020-05-12 Eric Botcazou * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry. diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index d164f1e..b1379fa 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -324,7 +324,7 @@ static bool nonnull_check_p (tree, unsigned HOST_WIDE_INT); 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 - C++ --std=c++2a: D_CONLY | D_OBJC + C++ --std=c++20: D_CONLY | D_OBJC ObjC++ is like C++ except that D_OBJC is not set If -fno-asm is used, D_ASM is added to the mask. If diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index 3e26ca0..7c1a637 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -720,8 +720,8 @@ enum cxx_dialect { cxx14, /* C++17 */ cxx17, - /* C++2a (C++20?) */ - cxx2a + /* C++20 */ + cxx20 }; /* The C++ dialect being used. C++98 is the default. */ diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c index db91a36..a7d65d6 100644 --- a/gcc/c-family/c-cppbuiltin.c +++ b/gcc/c-family/c-cppbuiltin.c @@ -988,7 +988,7 @@ c_cpp_builtins (cpp_reader *pfile) } if (cxx_dialect > cxx17) { - /* Set feature test macros for C++2a. */ + /* Set feature test macros for C++20. */ cpp_define (pfile, "__cpp_init_captures=201803L"); cpp_define (pfile, "__cpp_generic_lambdas=201707L"); cpp_define (pfile, "__cpp_designated_initializers=201707L"); @@ -1006,7 +1006,7 @@ c_cpp_builtins (cpp_reader *pfile) } if (flag_concepts) { - if (cxx_dialect >= cxx2a) + if (cxx_dialect >= cxx20) cpp_define (pfile, "__cpp_concepts=201907L"); else cpp_define (pfile, "__cpp_concepts=201507L"); diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index 58ba094..bd617d3 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -112,7 +112,7 @@ static void set_std_cxx98 (int); static void set_std_cxx11 (int); static void set_std_cxx14 (int); static void set_std_cxx17 (int); -static void set_std_cxx2a (int); +static void set_std_cxx20 (int); static void set_std_c89 (int, int); static void set_std_c99 (int); static void set_std_c11 (int); @@ -636,10 +636,10 @@ c_common_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, set_std_cxx17 (code == OPT_std_c__17 /* ISO */); break; - case OPT_std_c__2a: - case OPT_std_gnu__2a: + case OPT_std_c__20: + case OPT_std_gnu__20: if (!preprocessing_asm_p) - set_std_cxx2a (code == OPT_std_c__2a /* ISO */); + set_std_cxx20 (code == OPT_std_c__20 /* ISO */); break; case OPT_std_c90: @@ -925,11 +925,11 @@ c_common_post_options (const char **pfilename) /* -Wcomma-subscript is enabled by default in C++20. */ SET_OPTION_IF_UNSET (&global_options, &global_options_set, warn_comma_subscript, - cxx_dialect >= cxx2a && warn_deprecated); + cxx_dialect >= cxx20 && warn_deprecated); /* -Wvolatile is enabled by default in C++20. */ SET_OPTION_IF_UNSET (&global_options, &global_options_set, warn_volatile, - cxx_dialect >= cxx2a && warn_deprecated); + cxx_dialect >= cxx20 && warn_deprecated); /* Declone C++ 'structors if -Os. */ if (flag_declone_ctor_dtor == -1) @@ -1021,9 +1021,9 @@ c_common_post_options (const char **pfilename) if (flag_sized_deallocation == -1) flag_sized_deallocation = (cxx_dialect >= cxx14); - /* char8_t support is new in C++2A. */ + /* char8_t support is new in C++20. */ if (flag_char8_t == -1) - flag_char8_t = (cxx_dialect >= cxx2a); + flag_char8_t = (cxx_dialect >= cxx20); if (flag_extern_tls_init) { @@ -1045,11 +1045,11 @@ c_common_post_options (const char **pfilename) if (warn_return_type == -1 && c_dialect_cxx ()) warn_return_type = 1; - /* C++2a is the final version of concepts. We still use -fconcepts + /* C++20 is the final version of concepts. We still use -fconcepts to know when concepts are enabled. Note that -fconcepts-ts can be used to include additional features, although modified to work with the standard. */ - if (cxx_dialect >= cxx2a || flag_concepts_ts) + if (cxx_dialect >= cxx20 || flag_concepts_ts) flag_concepts = 1; else if (flag_concepts) /* For -std=c++17 -fconcepts, imply -fconcepts-ts. */ @@ -1724,9 +1724,9 @@ set_std_cxx17 (int iso) /* Set the C++ 202a draft standard (without GNU extensions if ISO). */ static void -set_std_cxx2a (int iso) +set_std_cxx20 (int iso) { - cpp_set_lang (parse_in, iso ? CLK_CXX2A: CLK_GNUCXX2A); + cpp_set_lang (parse_in, iso ? CLK_CXX20: CLK_GNUCXX20); flag_no_gnu_keywords = iso; flag_no_nonansi_builtin = iso; flag_iso = iso; @@ -1734,8 +1734,8 @@ set_std_cxx2a (int iso) flag_isoc94 = 1; flag_isoc99 = 1; flag_isoc11 = 1; - /* C++2a includes concepts. */ - cxx_dialect = cxx2a; + /* C++20 includes concepts. */ + cxx_dialect = cxx20; lang_hooks.name = "GNU C++17"; /* Pretend C++17 until standardization. */ } diff --git a/gcc/c-family/c-ubsan.c b/gcc/c-family/c-ubsan.c index 1d0a65b..06a9639 100644 --- a/gcc/c-family/c-ubsan.c +++ b/gcc/c-family/c-ubsan.c @@ -137,9 +137,9 @@ ubsan_instrument_shift (location_t loc, enum tree_code code, || maybe_ne (GET_MODE_BITSIZE (TYPE_MODE (type0)), TYPE_PRECISION (type0)) || !sanitize_flags_p (SANITIZE_SHIFT_BASE) - /* In C++2a and later, shifts are well defined except when + /* In C++20 and later, shifts are well defined except when the second operand is not within bounds. */ - || cxx_dialect >= cxx2a) + || cxx_dialect >= cxx20) ; /* For signed x << y, in C99/C11, the following: diff --git a/gcc/c-family/c-warn.c b/gcc/c-family/c-warn.c index f6b3afc..c32d822 100644 --- a/gcc/c-family/c-warn.c +++ b/gcc/c-family/c-warn.c @@ -2562,7 +2562,7 @@ diagnose_mismatched_attributes (tree olddecl, tree newdecl) /* Warn if signed left shift overflows. We don't warn about left-shifting 1 into the sign bit in C++14; cf. - and don't warn for C++2a at all, as signed left shifts never + and don't warn for C++20 at all, as signed left shifts never overflow. LOC is a location of the shift; OP0 and OP1 are the operands. Return true if an overflow is detected, false otherwise. */ @@ -2578,7 +2578,7 @@ maybe_warn_shift_overflow (location_t loc, tree op0, tree op1) unsigned int prec0 = TYPE_PRECISION (type0); /* Left-hand operand must be signed. */ - if (TYPE_UNSIGNED (type0) || cxx_dialect >= cxx2a) + if (TYPE_UNSIGNED (type0) || cxx_dialect >= cxx20) return false; unsigned int min_prec = (wi::min_precision (wi::to_wide (op0), SIGNED) diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index c49da99..89a5828 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -2074,11 +2074,11 @@ C++ ObjC++ Conform to the ISO 2017 C++ standard. std=c++2a -C++ ObjC++ +C++ ObjC++ Alias(std=c++20) Undocumented Conform to the ISO 2020 C++ draft standard (experimental and incomplete support). std=c++20 -C++ ObjC++ Alias(std=c++2a) +C++ ObjC++ Conform to the ISO 2020 C++ draft standard (experimental and incomplete support). std=c11 @@ -2152,11 +2152,11 @@ C++ ObjC++ Conform to the ISO 2017 C++ standard with GNU extensions. std=gnu++2a -C++ ObjC++ +C++ ObjC++ Alias(std=gnu++20) Conform to the ISO 2020 C++ draft standard with GNU extensions (experimental and incomplete support). std=gnu++20 -C++ ObjC++ Alias(std=gnu++2a) +C++ ObjC++ Conform to the ISO 2020 C++ draft standard with GNU extensions (experimental and incomplete support). std=gnu11 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7515827..11b3fdc 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2020-05-13 Jason Merrill + + * call.c, class.c, constexpr.c, constraint.cc, decl.c, init.c, + lambda.c, lex.c, method.c, name-lookup.c, parser.c, pt.c, tree.c, + typeck2.c: Change cxx2a to cxx20. + 2020-05-12 Marek Polacek PR c++/95074 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 85d670f..940e65d 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -6041,7 +6041,7 @@ add_operator_candidates (z_candidate **candidates, /* Maybe add C++20 rewritten comparison candidates. */ tree_code rewrite_code = ERROR_MARK; - if (cxx_dialect >= cxx2a + if (cxx_dialect >= cxx20 && nargs == 2 && (OVERLOAD_TYPE_P (arg1_type) || OVERLOAD_TYPE_P (arg2_type))) switch (code) @@ -6599,7 +6599,7 @@ extract_call_expr (tree call) call = TREE_OPERAND (call, 0); if (TREE_CODE (call) == TARGET_EXPR) call = TARGET_EXPR_INITIAL (call); - if (cxx_dialect >= cxx2a) + if (cxx_dialect >= cxx20) switch (TREE_CODE (call)) { /* C++20 rewritten comparison operators. */ @@ -7280,7 +7280,7 @@ maybe_inform_about_fndecl_for_bogus_argument_init (tree fn, int argnum) static void maybe_warn_array_conv (location_t loc, conversion *c, tree expr) { - if (cxx_dialect >= cxx2a) + if (cxx_dialect >= cxx20) return; tree type = TREE_TYPE (expr); @@ -7292,7 +7292,7 @@ maybe_warn_array_conv (location_t loc, conversion *c, tree expr) if (conv_binds_to_array_of_unknown_bound (c)) pedwarn (loc, OPT_Wpedantic, "conversions to arrays of unknown bound " - "are only available with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "are only available with %<-std=c++20%> or %<-std=gnu++20%>"); } /* Perform the conversions in CONVS on the expression EXPR. FN and @@ -10251,7 +10251,7 @@ build_new_method_call_1 (tree instance, tree fns, vec **args, the two. */ if (DECL_CONSTRUCTOR_P (fn) && !(flags & LOOKUP_ONLYCONVERTING) - && cxx_dialect >= cxx2a + && cxx_dialect >= cxx20 && CP_AGGREGATE_TYPE_P (basetype) && !user_args->is_empty ()) { diff --git a/gcc/cp/class.c b/gcc/cp/class.c index b66b8d4..15f490d 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -5314,7 +5314,7 @@ trivial_default_constructor_is_constexpr (tree t) struct S { int i; constexpr S() = default; }; should work. */ - return (cxx_dialect >= cxx2a + return (cxx_dialect >= cxx20 || is_really_empty_class (t, /*ignore_vptr*/true)); } @@ -5691,7 +5691,7 @@ finalize_literal_type_property (tree t) CLASSTYPE_LITERAL_P (t) = false; else if (CLASSTYPE_LITERAL_P (t) && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) - && (cxx_dialect < cxx2a || !type_maybe_constexpr_destructor (t))) + && (cxx_dialect < cxx20 || !type_maybe_constexpr_destructor (t))) CLASSTYPE_LITERAL_P (t) = false; else if (CLASSTYPE_LITERAL_P (t) && LAMBDA_TYPE_P (t)) CLASSTYPE_LITERAL_P (t) = (cxx_dialect >= cxx17); @@ -5745,7 +5745,7 @@ explain_non_literal_class (tree t) inform (UNKNOWN_LOCATION, " %qT is a closure type, which is only literal in " "C++17 and later", t); - else if (cxx_dialect < cxx2a && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)) + else if (cxx_dialect < cxx20 && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)) inform (UNKNOWN_LOCATION, " %q+T has a non-trivial destructor", t); else if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) && !type_maybe_constexpr_destructor (t)) @@ -5893,7 +5893,7 @@ check_bases_and_members (tree t) Again, other conditions for being an aggregate are checked elsewhere. */ CLASSTYPE_NON_AGGREGATE (t) - |= ((cxx_dialect < cxx2a + |= ((cxx_dialect < cxx20 ? type_has_user_provided_or_explicit_constructor (t) : TYPE_HAS_USER_CONSTRUCTOR (t)) || TYPE_POLYMORPHIC_P (t)); @@ -7499,7 +7499,7 @@ finish_struct (tree t, tree attributes) /* Remember current #pragma pack value. */ TYPE_PRECISION (t) = maximum_field_alignment; - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) { if (!CLASSTYPE_NON_AGGREGATE (t) && type_has_user_provided_or_explicit_constructor (t)) diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 706d8a1..04faabc 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -768,7 +768,7 @@ static bool cx_check_missing_mem_inits (tree ctype, tree body, bool complain) { /* We allow uninitialized bases/fields in C++20. */ - if (cxx_dialect >= cxx2a) + if (cxx_dialect >= cxx20) return false; unsigned nelts = 0; @@ -1723,7 +1723,7 @@ modifying_const_object_error (tree expr, tree obj) static inline bool cxx_replaceable_global_alloc_fn (tree fndecl) { - return (cxx_dialect >= cxx2a + return (cxx_dialect >= cxx20 && IDENTIFIER_NEWDEL_OP_P (DECL_NAME (fndecl)) && CP_DECL_CONTEXT (fndecl) == global_namespace && (DECL_IS_REPLACEABLE_OPERATOR_NEW_P (fndecl) @@ -1736,7 +1736,7 @@ cxx_replaceable_global_alloc_fn (tree fndecl) static inline bool cxx_placement_new_fn (tree fndecl) { - if (cxx_dialect >= cxx2a + if (cxx_dialect >= cxx20 && IDENTIFIER_NEW_OP_P (DECL_NAME (fndecl)) && CP_DECL_CONTEXT (fndecl) == global_namespace && !DECL_IS_REPLACEABLE_OPERATOR_NEW_P (fndecl) @@ -1789,7 +1789,7 @@ is_std_allocator_allocate (tree fndecl) static inline bool cxx_dynamic_cast_fn_p (tree fndecl) { - return (cxx_dialect >= cxx2a + return (cxx_dialect >= cxx20 && id_equal (DECL_NAME (fndecl), "__dynamic_cast") && CP_DECL_CONTEXT (fndecl) == global_namespace); } @@ -2628,7 +2628,7 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t, of value-initializing it. (reduced_constant_expression_p is expected to take care of clearing the flag.) */ if (TREE_CODE (result) == CONSTRUCTOR - && (cxx_dialect < cxx2a + && (cxx_dialect < cxx20 || !DECL_CONSTRUCTOR_P (fun))) clear_no_implicit_zero (result); @@ -2661,11 +2661,11 @@ reduced_constant_expression_p (tree t) if (TREE_CODE (TREE_TYPE (t)) == VECTOR_TYPE) /* An initialized vector would have a VECTOR_CST. */ return false; - else if (cxx_dialect >= cxx2a + else if (cxx_dialect >= cxx20 /* An ARRAY_TYPE doesn't have any TYPE_FIELDS. */ && TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE) field = NULL_TREE; - else if (cxx_dialect >= cxx2a + else if (cxx_dialect >= cxx20 && TREE_CODE (TREE_TYPE (t)) == UNION_TYPE) { if (CONSTRUCTOR_NELTS (t) == 0) @@ -2784,13 +2784,13 @@ cxx_eval_check_shift_p (location_t loc, const constexpr_ctx *ctx, representable in the corresponding unsigned type of the result type, then that value, converted to the result type, is the resulting value; otherwise, the behavior is undefined. - For C++2a: + For C++20: The value of E1 << E2 is the unique value congruent to E1 x 2^E2 modulo 2^N, where N is the range exponent of the type of the result. */ if (code == LSHIFT_EXPR && !TYPE_UNSIGNED (lhstype) && cxx_dialect >= cxx11 - && cxx_dialect < cxx2a) + && cxx_dialect < cxx20) { if (tree_int_cst_sgn (lhs) == -1) { @@ -4803,7 +4803,7 @@ cxx_eval_store_expression (const constexpr_ctx *ctx, tree t, if (code == UNION_TYPE && CONSTRUCTOR_NELTS (*valp) && CONSTRUCTOR_ELT (*valp, 0)->index != index) { - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) { if (!ctx->quiet) error_at (cp_expr_loc_or_input_loc (t), @@ -5422,7 +5422,7 @@ inline_asm_in_constexpr_error (location_t loc) auto_diagnostic_group d; error_at (loc, "inline assembly is not a constant expression"); inform (loc, "only unevaluated inline assembly is allowed in a " - "% function in C++2a"); + "% function in C++20"); } /* Attempt to reduce the expression T to a constant value. @@ -6582,7 +6582,7 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, type = TREE_TYPE (object); else { - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) return t; if (TREE_CODE (t) != CALL_EXPR && TREE_CODE (t) != AGGR_INIT_EXPR) return t; @@ -6595,7 +6595,7 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, is_consteval = true; } } - else if (cxx_dialect >= cxx2a + else if (cxx_dialect >= cxx20 && (TREE_CODE (t) == CALL_EXPR || TREE_CODE (t) == AGGR_INIT_EXPR || TREE_CODE (t) == TARGET_EXPR)) @@ -7422,7 +7422,7 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now, /* Allow any built-in function; if the expansion isn't constant, we'll deal with that then. */ && !fndecl_built_in_p (fun) - /* In C++2a, replaceable global allocation functions + /* In C++20, replaceable global allocation functions are constant expressions. */ && (!cxx_replaceable_global_alloc_fn (fun) || TREE_CODE (t) != CALL_EXPR @@ -7844,12 +7844,12 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now, return false; case OBJ_TYPE_REF: - if (cxx_dialect >= cxx2a) - /* In C++2a virtual calls can be constexpr, don't give up yet. */ + if (cxx_dialect >= cxx20) + /* In C++20 virtual calls can be constexpr, don't give up yet. */ return true; else if (flags & tf_error) error_at (loc, - "virtual functions cannot be % before C++2a"); + "virtual functions cannot be % before C++20"); return false; case TYPEID_EXPR: @@ -7857,7 +7857,7 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now, class type can be constexpr. */ { tree e = TREE_OPERAND (t, 0); - if (cxx_dialect < cxx2a + if (cxx_dialect < cxx20 && strict && !TYPE_P (e) && !type_dependent_expression_p (e) @@ -8153,7 +8153,7 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now, return true; case COND_EXPR: - if (COND_EXPR_IS_VEC_DELETE (t) && cxx_dialect < cxx2a) + if (COND_EXPR_IS_VEC_DELETE (t) && cxx_dialect < cxx20) { if (flags & tf_error) error_at (loc, "% is not a constant expression"); diff --git a/gcc/cp/constraint.cc b/gcc/cp/constraint.cc index 4ad17f3..3a17005 100644 --- a/gcc/cp/constraint.cc +++ b/gcc/cp/constraint.cc @@ -1473,7 +1473,7 @@ finish_shorthand_constraint (tree decl, tree constr) The standard behavior cannot be overridden by -fconcepts-ts. */ bool variadic_concept_p = template_parameter_pack_p (proto); bool declared_pack_p = template_parameter_pack_p (decl); - bool apply_to_each_p = (cxx_dialect >= cxx2a) ? true : !variadic_concept_p; + bool apply_to_each_p = (cxx_dialect >= cxx20) ? true : !variadic_concept_p; /* Get the argument and overload used for the requirement and adjust it if we're going to expand later. */ diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 1b6a567..37ab481 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -928,7 +928,7 @@ static bool function_requirements_equivalent_p (tree newfn, tree oldfn) { /* In the concepts TS, the combined constraints are compared. */ - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) { tree ci1 = get_constraints (oldfn); tree ci2 = get_constraints (newfn); @@ -5570,7 +5570,7 @@ grok_reference_init (tree decl, tree type, tree init, int flags) if (TREE_TYPE (init) == NULL_TREE && CP_AGGREGATE_TYPE_P (ttype) && !DECL_DECOMPOSITION_P (decl) - && (cxx_dialect >= cxx2a)) + && (cxx_dialect >= cxx20)) { /* We don't know yet if we should treat const A& r(1) as const A& r{1}. */ @@ -5896,7 +5896,7 @@ check_for_uninitialized_const_var (tree decl, bool constexpr_context_p, && (CP_TYPE_CONST_P (type) /* C++20 permits trivial default initialization in constexpr context (P1331R2). */ - || (cxx_dialect < cxx2a + || (cxx_dialect < cxx20 && (constexpr_context_p || var_in_constexpr_fn (decl)))) && !DECL_NONTRIVIALLY_INITIALIZED_P (decl)) @@ -5907,7 +5907,7 @@ check_for_uninitialized_const_var (tree decl, bool constexpr_context_p, bool show_notes = true; - if (!constexpr_context_p || cxx_dialect >= cxx2a) + if (!constexpr_context_p || cxx_dialect >= cxx20) { if (CP_TYPE_CONST_P (type)) { @@ -6721,7 +6721,7 @@ check_initializer (tree decl, tree init, int flags, vec **cleanups) && TREE_TYPE (init) == NULL_TREE && TREE_CODE (type) == ARRAY_TYPE && !DECL_DECOMPOSITION_P (decl) - && (cxx_dialect >= cxx2a)) + && (cxx_dialect >= cxx20)) { /* [dcl.init.string] "An array of ordinary character type [...] can be initialized by an ordinary string literal [...] by an @@ -7186,14 +7186,14 @@ notice_forced_label_r (tree *tp, int *walk_subtrees, void *) return NULL_TREE; } -/* Return true if DECL has either a trivial destructor, or for C++2A +/* Return true if DECL has either a trivial destructor, or for C++20 is constexpr and has a constexpr destructor. */ static bool decl_maybe_constant_destruction (tree decl, tree type) { return (TYPE_HAS_TRIVIAL_DESTRUCTOR (type) - || (cxx_dialect >= cxx2a + || (cxx_dialect >= cxx20 && VAR_P (decl) && DECL_DECLARED_CONSTEXPR_P (decl) && type_has_constexpr_destructor (strip_array_types (type)))); @@ -7253,7 +7253,7 @@ omp_declare_variant_finalize_one (tree decl, tree attr) if (idk == CP_ID_KIND_UNQUALIFIED || idk == CP_ID_KIND_TEMPLATE_ID) { if (identifier_p (variant) - /* In C++2A, we may need to perform ADL for a template + /* In C++20, we may need to perform ADL for a template name. */ || (TREE_CODE (variant) == TEMPLATE_ID_EXPR && identifier_p (TREE_OPERAND (variant, 0)))) @@ -11648,13 +11648,13 @@ grokdeclarator (const cp_declarator *declarator, storage_class = sc_none; staticp = 0; } - if (constexpr_p && cxx_dialect < cxx2a) + if (constexpr_p && cxx_dialect < cxx20) { gcc_rich_location richloc (declspecs->locations[ds_virtual]); richloc.add_range (declspecs->locations[ds_constexpr]); pedwarn (&richloc, OPT_Wpedantic, "member %qD can be declared both " - "% and % only in %<-std=c++2a%> or " - "%<-std=gnu++2a%>", dname); + "% and % only in %<-std=c++20%> or " + "%<-std=gnu++20%>", dname); } } friendp = decl_spec_seq_has_spec_p (declspecs, ds_friend); @@ -11741,10 +11741,10 @@ grokdeclarator (const cp_declarator *declarator, if (consteval_p) error_at (declspecs->locations[ds_consteval], "structured " "binding declaration cannot be %qs", "consteval"); - if (thread_p && cxx_dialect < cxx2a) + if (thread_p && cxx_dialect < cxx20) pedwarn (declspecs->locations[ds_thread], 0, "structured binding declaration can be %qs only in " - "%<-std=c++2a%> or %<-std=gnu++2a%>", + "%<-std=c++20%> or %<-std=gnu++20%>", declspecs->gnu_thread_keyword_p ? "__thread" : "thread_local"); if (concept_p) @@ -11763,10 +11763,10 @@ grokdeclarator (const cp_declarator *declarator, "register"); break; case sc_static: - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) pedwarn (loc, 0, "structured binding declaration can be %qs only in " - "%<-std=c++2a%> or %<-std=gnu++2a%>", "static"); + "%<-std=c++20%> or %<-std=gnu++20%>", "static"); break; case sc_extern: error_at (loc, "structured binding declaration cannot be %qs", @@ -13206,11 +13206,11 @@ grokdeclarator (const cp_declarator *declarator, "a destructor cannot be %qs", "concept"); return error_mark_node; } - if (constexpr_p && cxx_dialect < cxx2a) + if (constexpr_p && cxx_dialect < cxx20) { error_at (declspecs->locations[ds_constexpr], "% destructors only available" - " with %<-std=c++2a%> or %<-std=gnu++2a%>"); + " with %<-std=c++20%> or %<-std=gnu++20%>"); return error_mark_node; } if (consteval_p) diff --git a/gcc/cp/init.c b/gcc/cp/init.c index e2e547a..56715d6 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -812,7 +812,7 @@ perform_member_init (tree member, tree init) if (init && TREE_CODE (init) == TREE_LIST && (DIRECT_LIST_INIT_P (TREE_VALUE (init)) /* FIXME C++20 parenthesized aggregate init (PR 92812). */ - || !(/* cxx_dialect >= cxx2a ? CP_AGGREGATE_TYPE_P (type) */ + || !(/* cxx_dialect >= cxx20 ? CP_AGGREGATE_TYPE_P (type) */ /* : */CLASS_TYPE_P (type)))) init = build_x_compound_expr_from_list (init, ELK_MEM_INIT, tf_warning_or_error); @@ -2909,7 +2909,7 @@ build_new_constexpr_heap_type (tree elt_type, tree cookie_size, tree full_size) static tree maybe_wrap_new_for_constexpr (tree alloc_call, tree elt_type, tree cookie_size) { - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) return alloc_call; if (current_function_decl != NULL_TREE @@ -3611,7 +3611,7 @@ build_new_1 (vec **placement, tree type, tree nelts, means allocate an int, and initialize it with 10. In C++20, also handle `new A(1, 2)'. */ - if (cxx_dialect >= cxx2a + if (cxx_dialect >= cxx20 && AGGREGATE_TYPE_P (type) && (*init)->length () > 1) { diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c index b55c2f8..c94fe8e 100644 --- a/gcc/cp/lambda.c +++ b/gcc/cp/lambda.c @@ -702,7 +702,7 @@ add_default_capture (tree lambda_stack, tree id, tree initializer) initializer = convert_from_reference (var); /* Warn about deprecated implicit capture of this via [=]. */ - if (cxx_dialect >= cxx2a + if (cxx_dialect >= cxx20 && this_capture_p && LAMBDA_EXPR_DEFAULT_CAPTURE_MODE (lambda) == CPLD_COPY) { diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 37282d5..8a69bc4 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -229,7 +229,7 @@ init_reswords (void) if (cxx_dialect < cxx11) mask |= D_CXX11; - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) mask |= D_CXX20; if (!flag_concepts) mask |= D_CXX_CONCEPTS; diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 47f96aa..3f8842b 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -1095,10 +1095,10 @@ early_check_defaulted_comparison (tree fn) ctx = DECL_FRIEND_CONTEXT (fn); bool ok = true; - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) { - error_at (loc, "defaulted %qD only available with %<-std=c++2a%> or " - "%<-std=gnu++2a%>", fn); + error_at (loc, "defaulted %qD only available with %<-std=c++20%> or " + "%<-std=gnu++20%>", fn); return false; } @@ -1802,7 +1802,7 @@ constructible_expr (tree to, tree from) const int len = list_length (from); if (len > 1) { - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) /* Too many initializers. */ return error_mark_node; @@ -1831,7 +1831,7 @@ constructible_expr (tree to, tree from) /* If t(e) didn't work, maybe t{e} will. */ if (expr == NULL_TREE && len == 1 - && cxx_dialect >= cxx2a) + && cxx_dialect >= cxx20) { from = build_constructor_single (init_list_type_node, NULL_TREE, from); @@ -2074,7 +2074,7 @@ walk_field_subobs (tree fields, special_function_kind sfk, tree fnname, be constexpr, every member must have a user-provided default constructor or an explicit initializer. */ if (constexpr_p - && cxx_dialect < cxx2a + && cxx_dialect < cxx20 && !CLASS_TYPE_P (mem_type) && TREE_CODE (DECL_CONTEXT (field)) != UNION_TYPE) { @@ -2226,11 +2226,11 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p, /* "The closure type associated with a lambda-expression has a deleted default constructor and a deleted copy assignment operator." This is diagnosed in maybe_explain_implicit_delete. - In C++2a, only lambda-expressions with lambda-captures have those + In C++20, only lambda-expressions with lambda-captures have those deleted. */ if (LAMBDA_TYPE_P (ctype) && (sfk == sfk_constructor || sfk == sfk_copy_assignment) - && (cxx_dialect < cxx2a + && (cxx_dialect < cxx20 || LAMBDA_EXPR_CAPTURE_LIST (CLASSTYPE_LAMBDA_EXPR (ctype)) || LAMBDA_EXPR_DEFAULT_CAPTURE_MODE (CLASSTYPE_LAMBDA_EXPR (ctype)) != CPLD_NONE)) @@ -2274,7 +2274,7 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p, if (constexpr_p) *constexpr_p = (SFK_CTOR_P (sfk) || (SFK_ASSIGN_P (sfk) && cxx_dialect >= cxx14) - || (SFK_DTOR_P (sfk) && cxx_dialect >= cxx2a)); + || (SFK_DTOR_P (sfk) && cxx_dialect >= cxx20)); bool expected_trivial = type_has_trivial_fn (ctype, sfk); if (trivial_p) diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 9b68b15..4928b60 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -5635,19 +5635,19 @@ get_std_name_hint (const char *name) {"make_any", "", cxx17}, /* . */ {"array", "", cxx11}, - {"to_array", "", cxx2a}, + {"to_array", "", cxx20}, /* . */ {"atomic", "", cxx11}, {"atomic_flag", "", cxx11}, - {"atomic_ref", "", cxx2a}, + {"atomic_ref", "", cxx20}, /* . */ {"bitset", "", cxx11}, /* */ - {"weak_equality", "", cxx2a}, - {"strong_equality", "", cxx2a}, - {"partial_ordering", "", cxx2a}, - {"weak_ordering", "", cxx2a}, - {"strong_ordering", "", cxx2a}, + {"weak_equality", "", cxx20}, + {"strong_equality", "", cxx20}, + {"partial_ordering", "", cxx20}, + {"weak_ordering", "", cxx20}, + {"strong_ordering", "", cxx20}, /* . */ {"complex", "", cxx98}, {"complex_literals", "", cxx14}, @@ -5670,17 +5670,17 @@ get_std_name_hint (const char *name) {"ofstream", "", cxx98}, /* . */ {"bind", "", cxx11}, - {"bind_front", "", cxx2a}, + {"bind_front", "", cxx20}, {"function", "", cxx11}, {"hash", "", cxx11}, {"invoke", "", cxx17}, {"mem_fn", "", cxx11}, {"not_fn", "", cxx17}, {"reference_wrapper", "", cxx11}, - {"unwrap_reference", "", cxx2a}, - {"unwrap_reference_t", "", cxx2a}, - {"unwrap_ref_decay", "", cxx2a}, - {"unwrap_ref_decay_t", "", cxx2a}, + {"unwrap_reference", "", cxx20}, + {"unwrap_reference_t", "", cxx20}, + {"unwrap_ref_decay", "", cxx20}, + {"unwrap_ref_decay_t", "", cxx20}, /* . */ {"async", "", cxx11}, {"future", "", cxx11}, @@ -5763,7 +5763,7 @@ get_std_name_hint (const char *name) {"shared_mutex", "", cxx17}, {"shared_timed_mutex", "", cxx14}, /* . */ - {"source_location", "", cxx2a}, + {"source_location", "", cxx20}, /* . */ {"basic_stringbuf", "", cxx98}, {"basic_istringstream", "", cxx98}, @@ -5778,7 +5778,7 @@ get_std_name_hint (const char *name) {"basic_string", "", cxx98}, {"string", "", cxx98}, {"wstring", "", cxx98}, - {"u8string", "", cxx2a}, + {"u8string", "", cxx20}, {"u16string", "", cxx11}, {"u32string", "", cxx11}, /* . */ @@ -5804,10 +5804,10 @@ get_std_name_hint (const char *name) {"enable_if_t", "", cxx14}, {"invoke_result", "", cxx17}, {"invoke_result_t", "", cxx17}, - {"remove_cvref", "", cxx2a}, - {"remove_cvref_t", "", cxx2a}, - {"type_identity", "", cxx2a}, - {"type_identity_t", "", cxx2a}, + {"remove_cvref", "", cxx20}, + {"remove_cvref_t", "", cxx20}, + {"type_identity", "", cxx20}, + {"type_identity_t", "", cxx20}, {"void_t", "", cxx17}, {"conjunction", "", cxx17}, {"conjunction_v", "", cxx17}, @@ -5859,8 +5859,8 @@ get_cxx_dialect_name (enum cxx_dialect dialect) return "C++14"; case cxx17: return "C++17"; - case cxx2a: - return "C++2a"; + case cxx20: + return "C++20"; } } diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index f1ddef2..bc1ee21 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -1809,7 +1809,7 @@ enum constexpr. */ CP_PARSER_FLAGS_ONLY_TYPE_OR_CONSTEXPR = 0x8, /* When parsing a decl-specifier-seq, only allow mutable, constexpr or - for C++2A consteval. */ + for C++20 consteval. */ CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR = 0x10, /* When parsing a decl-specifier-seq, allow missing typename. */ CP_PARSER_FLAGS_TYPENAME_OPTIONAL = 0x20, @@ -3369,11 +3369,11 @@ cp_parser_diagnose_invalid_type_name (cp_parser *parser, tree id, && id_equal (id, "thread_local")) inform (location, "C++11 % only available with " "%<-std=c++11%> or %<-std=gnu++11%>"); - else if (cxx_dialect < cxx2a && id == ridpointers[(int)RID_CONSTINIT]) + else if (cxx_dialect < cxx20 && id == ridpointers[(int)RID_CONSTINIT]) inform (location, "C++20 % only available with " - "%<-std=c++2a%> or %<-std=gnu++2a%>"); + "%<-std=c++20%> or %<-std=gnu++20%>"); else if (!flag_concepts && id == ridpointers[(int)RID_CONCEPT]) - inform (location, "% only available with %<-std=c++2a%> or " + inform (location, "% only available with %<-std=c++20%> or " "%<-fconcepts%>"); else if (!flag_concepts && id == ridpointers[(int)RID_REQUIRES]) inform (location, "% only available with %<-std=c++2a%> or " @@ -7362,7 +7362,7 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p, || idk == CP_ID_KIND_TEMPLATE_ID) { if (identifier_p (postfix_expression) - /* In C++2A, we may need to perform ADL for a template + /* In C++20, we may need to perform ADL for a template name. */ || (TREE_CODE (postfix_expression) == TEMPLATE_ID_EXPR && identifier_p (TREE_OPERAND (postfix_expression, 0)))) @@ -10510,7 +10510,7 @@ cp_parser_lambda_expression (cp_parser* parser) LAMBDA_EXPR_LOCATION (lambda_expr) = token->location; - if (cxx_dialect >= cxx2a) + if (cxx_dialect >= cxx20) /* C++20 allows lambdas in unevaluated context. */; else if (cp_unevaluated_operand) { @@ -10518,7 +10518,7 @@ cp_parser_lambda_expression (cp_parser* parser) { error_at (LAMBDA_EXPR_LOCATION (lambda_expr), "lambda-expression in unevaluated context" - " only available with %<-std=c++2a%> or %<-std=gnu++2a%>"); + " only available with %<-std=c++20%> or %<-std=gnu++20%>"); token->error_reported = true; } ok = false; @@ -10528,7 +10528,7 @@ cp_parser_lambda_expression (cp_parser* parser) if (!token->error_reported) { error_at (token->location, "lambda-expression in template-argument" - " only available with %<-std=c++2a%> or %<-std=gnu++2a%>"); + " only available with %<-std=c++20%> or %<-std=gnu++20%>"); token->error_reported = true; } ok = false; @@ -10714,7 +10714,7 @@ cp_parser_lambda_introducer (cp_parser* parser, tree lambda_expr) if (cp_lexer_next_token_is_keyword (parser->lexer, RID_THIS)) { location_t loc = cp_lexer_peek_token (parser->lexer)->location; - if (cxx_dialect < cxx2a + if (cxx_dialect < cxx20 && LAMBDA_EXPR_DEFAULT_CAPTURE_MODE (lambda_expr) == CPLD_COPY) pedwarn (loc, 0, "explicit by-copy capture of % redundant " "with by-copy capture default"); @@ -10774,9 +10774,9 @@ cp_parser_lambda_introducer (cp_parser* parser, tree lambda_expr) if (cp_lexer_next_token_is (parser->lexer, CPP_ELLIPSIS)) { ellipsis_loc = cp_lexer_peek_token (parser->lexer)->location; - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) pedwarn (ellipsis_loc, 0, "pack init-capture only available with " - "%<-std=c++2a%> or %<-std=gnu++2a%>"); + "%<-std=c++20%> or %<-std=gnu++20%>"); cp_lexer_consume_token (parser->lexer); init_pack_expansion = true; } @@ -10993,10 +10993,10 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) pedwarn (parser->lexer->next_token->location, 0, "lambda templates are only available with " "%<-std=c++14%> or %<-std=gnu++14%>"); - else if (cxx_dialect < cxx2a) + else if (cxx_dialect < cxx20) pedwarn (parser->lexer->next_token->location, OPT_Wpedantic, "lambda templates are only available with " - "%<-std=c++2a%> or %<-std=gnu++2a%>"); + "%<-std=c++20%> or %<-std=gnu++20%>"); cp_lexer_consume_token (parser->lexer); @@ -11030,7 +11030,7 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) bool is_consteval = false; /* For C++20, before parsing the parameter list check if there is a consteval specifier in the corresponding decl-specifier-seq. */ - if (cxx_dialect >= cxx2a) + if (cxx_dialect >= cxx20) { for (size_t n = cp_parser_skip_balanced_tokens (parser, 1); cp_lexer_nth_token_is (parser->lexer, n, CPP_KEYWORD); n++) @@ -12970,11 +12970,11 @@ cp_parser_init_statement (cp_parser *parser, tree *decl) /* That didn't work, try to parse it as an expression-statement. */ cp_parser_expression_statement (parser, NULL_TREE); - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) { pedwarn (cp_lexer_peek_token (parser->lexer)->location, 0, "range-based % loops with initializer only " - "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "available with %<-std=c++20%> or %<-std=gnu++20%>"); *decl = error_mark_node; } } @@ -14486,7 +14486,7 @@ cp_parser_storage_class_specifier_opt (cp_parser* parser) virtual explicit - C++2A Extension: + C++20 Extension: explicit(constant-expression) Returns an IDENTIFIER_NODE corresponding to the keyword used. @@ -14530,10 +14530,10 @@ cp_parser_function_specifier_opt (cp_parser* parser, parser->type_definition_forbidden_message = G_("types may not be defined in explicit-specifier"); - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) pedwarn (token->location, 0, - "% only available with %<-std=c++2a%> " - "or %<-std=gnu++2a%>"); + "% only available with %<-std=c++20%> " + "or %<-std=gnu++20%>"); /* Parse the constant-expression. */ expr = cp_parser_constant_expression (parser); @@ -16682,12 +16682,12 @@ cp_parser_template_id (cp_parser *parser, /* This didn't go well. */ if (TREE_CODE (templ) == FUNCTION_DECL) { - /* C++2A says that "function-name < a;" is now ill-formed. */ + /* C++20 says that "function-name < a;" is now ill-formed. */ if (cp_parser_error_occurred (parser)) { error_at (token->location, "invalid template-argument-list"); inform (token->location, "function name as the left hand " - "operand of %<<%> is ill-formed in C++2a; wrap the " + "operand of %<<%> is ill-formed in C++20; wrap the " "function name in %<()%>"); } else @@ -17391,7 +17391,7 @@ cp_parser_template_argument (cp_parser* parser) else { /* In C++20, we can encounter a braced-init-list. */ - if (cxx_dialect >= cxx2a + if (cxx_dialect >= cxx20 && cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE)) { bool expr_non_constant_p; @@ -18112,7 +18112,7 @@ cp_parser_simple_type_specifier (cp_parser* parser, { bool qualified_p; bool global_p; - const bool typename_p = (cxx_dialect >= cxx2a + const bool typename_p = (cxx_dialect >= cxx20 && (flags & CP_PARSER_FLAGS_TYPENAME_OPTIONAL)); /* Don't gobble tokens or issue error messages if this is an @@ -18378,7 +18378,7 @@ cp_parser_placeholder_type_specifier (cp_parser *parser, location_t loc, /* As per the standard, require auto or decltype(auto), except in some cases (template parameter lists, -fconcepts-ts enabled). */ cp_token *placeholder = NULL, *close_paren = NULL; - if (cxx_dialect >= cxx2a) + if (cxx_dialect >= cxx20) { if (cp_lexer_next_token_is_keyword (parser->lexer, RID_AUTO)) placeholder = cp_lexer_consume_token (parser->lexer); @@ -19631,10 +19631,10 @@ cp_parser_namespace_definition (cp_parser* parser) RID_INLINE); if (nested_inline_p && nested_definition_count != 0) { - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) pedwarn (cp_lexer_peek_token (parser->lexer)->location, OPT_Wpedantic, "nested inline namespace definitions only " - "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "available with %<-std=c++20%> or %<-std=gnu++20%>"); cp_lexer_consume_token (parser->lexer); } @@ -20187,13 +20187,13 @@ cp_parser_asm_definition (cp_parser* parser) /* Look for the `asm' keyword. */ cp_parser_require_keyword (parser, RID_ASM, RT_ASM); - /* In C++2a, unevaluated inline assembly is permitted in constexpr + /* In C++20, unevaluated inline assembly is permitted in constexpr functions. */ if (parser->in_function_body && DECL_DECLARED_CONSTEXPR_P (current_function_decl) - && (cxx_dialect < cxx2a)) + && (cxx_dialect < cxx20)) pedwarn (asm_loc, 0, "% in % function only available " - "with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "with %<-std=c++20%> or %<-std=gnu++20%>"); /* Handle the asm-qualifier-list. */ location_t volatile_loc = UNKNOWN_LOCATION; @@ -21600,7 +21600,7 @@ cp_parser_direct_declarator (cp_parser* parser, - it is a decl-specifier of the decl-specifier-seq of a parameter-declaration in a declarator of a function or function template declaration, ... */ - if (cxx_dialect >= cxx2a + if (cxx_dialect >= cxx20 && (flags & CP_PARSER_FLAGS_TYPENAME_OPTIONAL) && declarator->kind == cdk_id && !at_class_scope_p () @@ -23082,16 +23082,16 @@ cp_parser_ctor_initializer_opt_and_function_body (cp_parser *parser, if (in_function_try_block && DECL_DECLARED_CONSTEXPR_P (current_function_decl) - && cxx_dialect < cxx2a) + && cxx_dialect < cxx20) { if (DECL_CONSTRUCTOR_P (current_function_decl)) pedwarn (input_location, 0, "function-try-block body of % constructor only " - "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "available with %<-std=c++20%> or %<-std=gnu++20%>"); else pedwarn (input_location, 0, "function-try-block body of % function only " - "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "available with %<-std=c++20%> or %<-std=gnu++20%>"); } /* Begin the function body. */ @@ -23351,7 +23351,7 @@ cp_parser_array_designator_p (cp_parser *parser) initializer-clause ... [opt] initializer-list , initializer-clause ... [opt] - C++2A Extension: + C++20 Extension: designated-initializer-list: designated-initializer-clause @@ -23403,8 +23403,8 @@ cp_parser_initializer_list (cp_parser* parser, bool* non_constant_p, bool clause_non_constant_p; location_t loc = cp_lexer_peek_token (parser->lexer)->location; - /* Handle the C++2A syntax, '. id ='. */ - if ((cxx_dialect >= cxx2a + /* Handle the C++20 syntax, '. id ='. */ + if ((cxx_dialect >= cxx20 || cp_parser_allow_gnu_extensions_p (parser)) && cp_lexer_next_token_is (parser->lexer, CPP_DOT) && cp_lexer_peek_nth_token (parser->lexer, 2)->type == CPP_NAME @@ -23412,10 +23412,10 @@ cp_parser_initializer_list (cp_parser* parser, bool* non_constant_p, || (cp_lexer_peek_nth_token (parser->lexer, 3)->type == CPP_OPEN_BRACE))) { - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) pedwarn (loc, OPT_Wpedantic, "C++ designated initializers only available with " - "%<-std=c++2a%> or %<-std=gnu++2a%>"); + "%<-std=c++20%> or %<-std=gnu++20%>"); /* Consume the `.'. */ cp_lexer_consume_token (parser->lexer); /* Consume the identifier. */ @@ -23482,7 +23482,7 @@ cp_parser_initializer_list (cp_parser* parser, bool* non_constant_p, first_designator = designator; first_p = false; } - else if (cxx_dialect >= cxx2a + else if (cxx_dialect >= cxx20 && first_designator != error_mark_node && (!first_designator != !designator)) { @@ -23490,7 +23490,7 @@ cp_parser_initializer_list (cp_parser* parser, bool* non_constant_p, "or none of them should be"); first_designator = error_mark_node; } - else if (cxx_dialect < cxx2a && !first_designator) + else if (cxx_dialect < cxx20 && !first_designator) first_designator = designator; /* Parse the initializer. */ @@ -23509,7 +23509,7 @@ cp_parser_initializer_list (cp_parser* parser, bool* non_constant_p, /* Consume the `...'. */ cp_lexer_consume_token (parser->lexer); - if (designator && cxx_dialect >= cxx2a) + if (designator && cxx_dialect >= cxx20) error_at (loc, "%<...%> not allowed in designated initializer list"); @@ -25111,7 +25111,7 @@ cp_parser_member_declaration (cp_parser* parser) width = cp_parser_constant_expression (parser, false, NULL, cxx_dialect >= cxx11); - /* In C++2A and as extension for C++11 and above we allow + /* In C++20 and as extension for C++11 and above we allow default member initializers for bit-fields. */ initializer = NULL_TREE; if (cxx_dialect >= cxx11 @@ -25121,12 +25121,12 @@ cp_parser_member_declaration (cp_parser* parser) { location_t loc = cp_lexer_peek_token (parser->lexer)->location; - if (cxx_dialect < cxx2a + if (cxx_dialect < cxx20 && identifier != NULL_TREE) pedwarn (loc, 0, "default member initializers for bit-fields " - "only available with %<-std=c++2a%> or " - "%<-std=gnu++2a%>"); + "only available with %<-std=c++20%> or " + "%<-std=gnu++20%>"); initializer = cp_parser_save_nsdmi (parser); if (identifier == NULL_TREE) @@ -26084,10 +26084,10 @@ cp_parser_try_block (cp_parser* parser) cp_parser_require_keyword (parser, RID_TRY, RT_TRY); if (parser->in_function_body && DECL_DECLARED_CONSTEXPR_P (current_function_decl) - && cxx_dialect < cxx2a) + && cxx_dialect < cxx20) pedwarn (input_location, 0, "% in % function only " - "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "available with %<-std=c++20%> or %<-std=gnu++20%>"); try_block = begin_try_block (); cp_parser_compound_statement (parser, NULL, BCS_TRY_BLOCK, false); @@ -27705,7 +27705,7 @@ cp_parser_requires_clause_opt (cp_parser *parser, bool lambda_p) { error_at (cp_lexer_peek_token (parser->lexer)->location, "% only available with " - "%<-std=c++2a%> or %<-fconcepts%>"); + "%<-std=c++20%> or %<-fconcepts%>"); /* Parse and discard the requires-clause. */ cp_lexer_consume_token (parser->lexer); cp_parser_constraint_expression (parser); @@ -28035,7 +28035,7 @@ cp_parser_compound_requirement (cp_parser *parser) bool saved_result_type_constraint_p = parser->in_result_type_constraint_p; parser->in_result_type_constraint_p = true; - /* C++2a allows either a type-id or a type-constraint. Parsing + /* C++20 allows either a type-id or a type-constraint. Parsing a type-id will subsume the parsing for a type-constraint but allow for more syntactic forms (e.g., const C*). */ type = cp_parser_trailing_type_id (parser); @@ -29049,7 +29049,7 @@ cp_parser_template_declaration_after_parameters (cp_parser* parser, else if (cxx_dialect >= cxx11 && cp_lexer_next_token_is_keyword (parser->lexer, RID_USING)) decl = cp_parser_alias_declaration (parser); - else if (cxx_dialect >= cxx2a /* Implies flag_concept. */ + else if (cxx_dialect >= cxx20 /* Implies flag_concept. */ && cp_lexer_next_token_is_keyword (parser->lexer, RID_CONCEPT) && !cp_lexer_nth_token_is_keyword (parser->lexer, 2, RID_BOOL)) /* Allow 'concept bool' to be handled as per the TS. */ diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 7911293..f0cb7a2 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -3490,7 +3490,7 @@ template_heads_equivalent_p (const_tree tmpl1, const_tree tmpl2) tree parms2 = DECL_TEMPLATE_PARMS (tmpl2); /* Don't change the matching rules for pre-C++20. */ - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) return comp_template_parms (parms1, parms2); /* ... have the same number of template parameters, and their @@ -5776,7 +5776,7 @@ push_template_decl_real (tree decl, bool is_friend) else if (VAR_P (decl)) /* C++14 variable template. */; else if (TREE_CODE (decl) == CONCEPT_DECL) - /* C++2a concept definitions. */; + /* C++20 concept definitions. */; else { error ("template declaration of %q#D", decl); @@ -9070,7 +9070,7 @@ coerce_innermost_template_parms (tree parms, static bool class_nttp_const_wrapper_p (tree t) { - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) return false; return (TREE_CODE (t) == VIEW_CONVERT_EXPR && CP_TYPE_CONST_P (TREE_TYPE (t)) @@ -26137,11 +26137,11 @@ invalid_nontype_parm_type_p (tree type, tsubst_flags_t complain) return false; else if (TREE_CODE (type) == TEMPLATE_TYPE_PARM) { - if (CLASS_PLACEHOLDER_TEMPLATE (type) && cxx_dialect < cxx2a) + if (CLASS_PLACEHOLDER_TEMPLATE (type) && cxx_dialect < cxx20) { if (complain & tf_error) error ("non-type template parameters of deduced class type only " - "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "available with %<-std=c++20%> or %<-std=gnu++20%>"); return true; } return false; @@ -26159,11 +26159,11 @@ invalid_nontype_parm_type_p (tree type, tsubst_flags_t complain) return false; else if (CLASS_TYPE_P (type)) { - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) { if (complain & tf_error) error ("non-type template parameters of class type only available " - "with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "with %<-std=c++20%> or %<-std=gnu++20%>"); return true; } if (dependent_type_p (type)) @@ -28383,7 +28383,7 @@ is_spec_or_derived (tree etype, tree tmpl) static tree maybe_aggr_guide (tree tmpl, tree init, vec *args) { - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) return NULL_TREE; if (init == NULL_TREE) @@ -28750,12 +28750,12 @@ do_class_deduction (tree ptype, tree tmpl, tree init, error ("non-deducible template %qT used without template arguments", tmpl); return error_mark_node; } - else if (cxx_dialect < cxx2a && DECL_ALIAS_TEMPLATE_P (tmpl)) + else if (cxx_dialect < cxx20 && DECL_ALIAS_TEMPLATE_P (tmpl)) { /* This doesn't affect conforming C++17 code, so just pedwarn. */ if (complain & tf_warning_or_error) pedwarn (input_location, 0, "alias template deduction only available " - "with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "with %<-std=c++20%> or %<-std=gnu++20%>"); } if (init && TREE_TYPE (init) == ptype) diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index d526a63..2090cbf 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -691,7 +691,7 @@ build_cplus_new (tree type, tree init, tsubst_flags_t complain) it can produce a { }. */ if (BRACE_ENCLOSED_INITIALIZER_P (init)) { - gcc_assert (cxx_dialect >= cxx2a); + gcc_assert (cxx_dialect >= cxx20); return finish_compound_literal (type, init, complain); } @@ -4599,7 +4599,7 @@ handle_nodiscard_attribute (tree *node, tree name, tree args, return NULL_TREE; } -/* Handle a C++2a "no_unique_address" attribute; arguments as in +/* Handle a C++20 "no_unique_address" attribute; arguments as in struct attribute_spec.handler. */ static tree handle_no_unique_addr_attribute (tree* node, diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index d407e4c..af84c25 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -1102,7 +1102,7 @@ check_narrowing (tree type, tree init, tsubst_flags_t complain, return ok; } -/* True iff TYPE is a C++2a "ordinary" character type. */ +/* True iff TYPE is a C++20 "ordinary" character type. */ bool ordinary_char_type_p (tree type) @@ -2236,7 +2236,7 @@ build_m_component_ref (tree datum, tree component, tsubst_flags_t complain) { /* 5.5/6: In a .* expression whose object expression is an rvalue, the program is ill-formed if the second operand is a pointer to member - function with ref-qualifier & (for C++2A: unless its cv-qualifier-seq + function with ref-qualifier & (for C++20: unless its cv-qualifier-seq is const). In a .* expression whose object expression is an lvalue, the program is ill-formed if the second operand is a pointer to member function with ref-qualifier &&. */ @@ -2261,12 +2261,12 @@ build_m_component_ref (tree datum, tree component, tsubst_flags_t complain) "an lvalue", ptrmem_type); return error_mark_node; } - else if (cxx_dialect < cxx2a) + else if (cxx_dialect < cxx20) { if (complain & tf_warning_or_error) pedwarn (input_location, OPT_Wpedantic, "pointer-to-member-function type %qT requires " - "an lvalue before C++2a", ptrmem_type); + "an lvalue before C++20", ptrmem_type); else return error_mark_node; } diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 396446f..fad5eb4 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -13609,7 +13609,7 @@ generic_parameter_die (tree parm, tree arg, dw_die_ref tmpl_die = NULL; const char *name = NULL; - /* C++2a accepts class literals as template parameters, and var + /* C++20 accepts class literals as template parameters, and var decls with initializers represent them. The VAR_DECLs would be rejected, but we can take the DECL_INITIAL constructor and attempt to expand it. */ diff --git a/gcc/testsuite/g++.dg/cpp2a/aggr1.C b/gcc/testsuite/g++.dg/cpp2a/aggr1.C index 73a257c..ea59923 100644 --- a/gcc/testsuite/g++.dg/cpp2a/aggr1.C +++ b/gcc/testsuite/g++.dg/cpp2a/aggr1.C @@ -1,15 +1,15 @@ // { dg-do compile { target c++11 } } struct A { - A () = delete; // { dg-message "declared here" "" { target c++2a } } + A () = delete; // { dg-message "declared here" "" { target c++20 } } }; struct B { B () = default; int b = 0; }; struct C { - C (C&&) = default; // { dg-message "candidate" "" { target c++2a } } + C (C&&) = default; // { dg-message "candidate" "" { target c++20 } } int c, d; }; -A a {}; // { dg-error "use of deleted function" "" { target c++2a } } -B b = {1}; // { dg-error "could not convert" "" { target { c++11_only || c++2a } } } -C *c = new C {2, 3}; // { dg-error "no matching function for call to" "" { target c++2a } } +A a {}; // { dg-error "use of deleted function" "" { target c++20 } } +B b = {1}; // { dg-error "could not convert" "" { target { c++11_only || c++20 } } } +C *c = new C {2, 3}; // { dg-error "no matching function for call to" "" { target c++20 } } diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv11.C b/gcc/testsuite/g++.dg/cpp2a/array-conv11.C index a072b29..04a531c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv11.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv11.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-Wpedantic" } // Test flexible array member. Here we're binding int[] to int[]. This worked diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv12.C b/gcc/testsuite/g++.dg/cpp2a/array-conv12.C index 1156ea3..b0dd819 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv12.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv12.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-Wpedantic" } int arr[1] = { 42 }; diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv13.C b/gcc/testsuite/g++.dg/cpp2a/array-conv13.C index 9908b7e..96b65a5 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv13.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv13.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template void foo(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv14.C b/gcc/testsuite/g++.dg/cpp2a/array-conv14.C index 793e85d..8406b99 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv14.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv14.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } void f(const int(*)[]); void fb(const int(*)[3]); diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv15.C b/gcc/testsuite/g++.dg/cpp2a/array-conv15.C index 033a746..17f917a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv15.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv15.C @@ -1,5 +1,5 @@ // PR c++/69531 - DR 1307, Overload resolution based on size of array init-list. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } int f(int, int const(&)[2]) { return 1; } int f(double, int const(&)[2]) { return 2; } diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv16.C b/gcc/testsuite/g++.dg/cpp2a/array-conv16.C index bfb39d1..1413971 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv16.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv16.C @@ -1,5 +1,5 @@ // PR c++/91364 - P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } using P = int *(*)[3]; using S = const int *const (*)[]; diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv17.C b/gcc/testsuite/g++.dg/cpp2a/array-conv17.C index 3313ed4..a879099 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv17.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv17.C @@ -1,5 +1,5 @@ // PR c++/91364 - P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // As conversion/qual1.C, but with []. diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv2.C b/gcc/testsuite/g++.dg/cpp2a/array-conv2.C index 5245d83..37e9e05 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv2.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv2.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { A(); diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv3.C b/gcc/testsuite/g++.dg/cpp2a/array-conv3.C index 3d92b40..1ce041e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv3.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv3.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } // Ranking of reference initialization conversions diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv4.C b/gcc/testsuite/g++.dg/cpp2a/array-conv4.C index 979c69b..3f6f92c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv4.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv4.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Ranking of reference initialization conversions diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv5.C b/gcc/testsuite/g++.dg/cpp2a/array-conv5.C index 34678f5..e1058cd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv5.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv5.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } // Ranking of list-initialization sequences int b(int (&&)[] ) { return 1; } // #1 diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv6.C b/gcc/testsuite/g++.dg/cpp2a/array-conv6.C index c2389c8..dc10640 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv6.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv6.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } // Ranking of reference initialization conversions diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv7.C b/gcc/testsuite/g++.dg/cpp2a/array-conv7.C index 07c709f..1ea1a69 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv7.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv7.C @@ -1,5 +1,5 @@ // PR c++/69531 - DR 1307, Overload resolution based on size of array init-list. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } int f(int const(&)[]) { return 1; } int f(int const(&)[2]) { return 2; } diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv8.C b/gcc/testsuite/g++.dg/cpp2a/array-conv8.C index 635c767..77a07ea 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv8.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv8.C @@ -1,5 +1,5 @@ // PR c++/69531 - DR 1307, Overload resolution based on size of array init-list. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } // Example from [over.ics.rank]. int f(int (&&)[] ) { return 1; } // #1 diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv9.C b/gcc/testsuite/g++.dg/cpp2a/array-conv9.C index 63318c5..4081cce 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv9.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv9.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } int arr[1]; extern int arr2[]; diff --git a/gcc/testsuite/g++.dg/cpp2a/attr-likely1.C b/gcc/testsuite/g++.dg/cpp2a/attr-likely1.C index 43de249..03b210d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/attr-likely1.C +++ b/gcc/testsuite/g++.dg/cpp2a/attr-likely1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options -fdump-tree-gimple } // { dg-final { scan-tree-dump-times "hot label" 5 "gimple" } } // { dg-final { scan-tree-dump-times "cold label" 3 "gimple" } } diff --git a/gcc/testsuite/g++.dg/cpp2a/attr-likely2.C b/gcc/testsuite/g++.dg/cpp2a/attr-likely2.C index 6c59610..ee178de 100644 --- a/gcc/testsuite/g++.dg/cpp2a/attr-likely2.C +++ b/gcc/testsuite/g++.dg/cpp2a/attr-likely2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } bool b; int main() diff --git a/gcc/testsuite/g++.dg/cpp2a/attr-likely3.C b/gcc/testsuite/g++.dg/cpp2a/attr-likely3.C index bb1265d..6e37dbd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/attr-likely3.C +++ b/gcc/testsuite/g++.dg/cpp2a/attr-likely3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } [[likely]] void f() { } // { dg-warning "function" } diff --git a/gcc/testsuite/g++.dg/cpp2a/attr-likely4.C b/gcc/testsuite/g++.dg/cpp2a/attr-likely4.C index bf0dc4c..0a96edc 100644 --- a/gcc/testsuite/g++.dg/cpp2a/attr-likely4.C +++ b/gcc/testsuite/g++.dg/cpp2a/attr-likely4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } int a, b, c; diff --git a/gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr1.C b/gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr1.C index 61ba65a..f7bd72b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr1.C +++ b/gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr1.C @@ -1,5 +1,5 @@ // Testcase from P1816R0 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr2.C b/gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr2.C index 896554f..2fdf4e8 100644 --- a/gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr2.C +++ b/gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr2.C @@ -1,5 +1,5 @@ // Test that non-aggregates don't get the aggregate deduction. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-prune-output "no matching function" } struct A { A(); }; diff --git a/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias1.C b/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias1.C index ed47eb3..6890d0a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias1.C +++ b/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias1.C @@ -1,5 +1,5 @@ // Testcase from P1814R0 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct identity { using type = T; }; template using identity_t = typename identity::type; diff --git a/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias2.C b/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias2.C index d855f7d..07876a4 100644 --- a/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias2.C +++ b/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias2.C @@ -1,6 +1,6 @@ // Test that a non-template deduction guide that doesn't match the alias is // ignored. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct identity { using type = T; }; template using identity_t = typename identity::type; diff --git a/gcc/testsuite/g++.dg/cpp2a/comma1.C b/gcc/testsuite/g++.dg/cpp2a/comma1.C index 8ffe5d7..d9c140d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/comma1.C +++ b/gcc/testsuite/g++.dg/cpp2a/comma1.C @@ -8,19 +8,19 @@ struct S { void fn (int *a, int b, int c) { - a[b,c]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++2a } } + a[b,c]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20 } } a[(b,c)]; - a[(void) b, c]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++2a } } + a[(void) b, c]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20 } } a[((void) b, c)]; - a[(void) b, (void) c, (void) b, b]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++2a } } + a[(void) b, (void) c, (void) b, b]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20 } } a[((void) b, (void) c, (void) b, b)]; - a[S(), 10]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++2a } } + a[S(), 10]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20 } } a[(S(), 10)]; a[int{(1,2)}]; - a[int{(1,2)}, int{}]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++2a } } + a[int{(1,2)}, int{}]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20 } } a[(int{(1,2)}, int{})]; } diff --git a/gcc/testsuite/g++.dg/cpp2a/comma2.C b/gcc/testsuite/g++.dg/cpp2a/comma2.C index 15fd26a..995944f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/comma2.C +++ b/gcc/testsuite/g++.dg/cpp2a/comma2.C @@ -1,5 +1,5 @@ // PR c++/91338 - P1161R3: Deprecate a[b,c]. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-Wno-comma-subscript" } struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/comma4.C b/gcc/testsuite/g++.dg/cpp2a/comma4.C index 23183ad..0d149c7 100644 --- a/gcc/testsuite/g++.dg/cpp2a/comma4.C +++ b/gcc/testsuite/g++.dg/cpp2a/comma4.C @@ -1,5 +1,5 @@ // PR c++/91338 - P1161R3: Deprecate a[b,c]. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-Wno-deprecated" } struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/comma5.C b/gcc/testsuite/g++.dg/cpp2a/comma5.C index 68d19c0..acf5d43 100644 --- a/gcc/testsuite/g++.dg/cpp2a/comma5.C +++ b/gcc/testsuite/g++.dg/cpp2a/comma5.C @@ -1,5 +1,5 @@ // PR c++/91391 - bogus -Wcomma-subscript warning. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template int foo(T t, U u) { return t + u; } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-alias.C b/gcc/testsuite/g++.dg/cpp2a/concepts-alias.C index 8628791..b808967 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-alias.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-alias.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Class = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-alias3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-alias3.C index 02e960a..2ac9ae2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-alias3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-alias3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct A { }; template concept int_type = __is_same_as (T, int); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-alias4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-alias4.C index d37ce6a..26b3d4a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-alias4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-alias4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct A { }; template concept int_type = __is_same_as (T, int); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-alias5.C b/gcc/testsuite/g++.dg/cpp2a/concepts-alias5.C index 907b0c2..a565de6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-alias5.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-alias5.C @@ -1,5 +1,5 @@ // PR c++/93377 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct empty {}; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-class.C b/gcc/testsuite/g++.dg/cpp2a/concepts-class.C index aca5c44..b50cb42 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-class.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-class.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Class = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-cmath.C b/gcc/testsuite/g++.dg/cpp2a/concepts-cmath.C index b090c3a..d13100b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-cmath.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-cmath.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-complete1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-complete1.C index 25c4ca0..63f3696 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-complete1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-complete1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept has_mem_type = requires { typename T::type; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-constrained-parm.C b/gcc/testsuite/g++.dg/cpp2a/concepts-constrained-parm.C index bb7e31d..18564c8 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-constrained-parm.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-constrained-parm.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-conv2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-conv2.C index 821042f..f61f260 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-conv2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-conv2.C @@ -1,5 +1,5 @@ // PR c++/94597 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept d = requires(b e) { e.operator c(); }; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-decltype.C b/gcc/testsuite/g++.dg/cpp2a/concepts-decltype.C index db3cfdf..13733c6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-decltype.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-decltype.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Tests constrained decltype(auto). diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-dr1430.C b/gcc/testsuite/g++.dg/cpp2a/concepts-dr1430.C index 91eefee..8004769 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-dr1430.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-dr1430.C @@ -1,5 +1,5 @@ // PR c++/66092 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Similar = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst1.C index 14d994c..5cbf64a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-final { scan-assembler "_Z1gI1XEvT_" } } // { dg-final { scan-assembler "_Z1gI1YEvT_" } } // { dg-final { scan-assembler "_Z1gIiEvT_" } } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst2.C index 6074bc7..5756b0d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst3.C index 03ec9e9..105f39e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst4.C index 81bc081..562fc13 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec1.C index d54bcdb..2fe4799 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec1.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec2.C index 4103714..99f83cb 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec3.C index 76c6fb9..3f2d62c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec4.C index 0634eaf..471eaba 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec4.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec5.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec5.C index b682b0d..a15749a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec5.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec5.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec6.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec6.C index 13f04d7..e726e1c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec6.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-feature-macro.C b/gcc/testsuite/g++.dg/cpp2a/concepts-feature-macro.C index 56fbb68..50a0832 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-feature-macro.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-feature-macro.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #ifndef __cpp_concepts #error __cpp_concepts not defined diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-fn1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-fn1.C index 9287ab8..238eb81 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-fn1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-fn1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Type = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-fn2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-fn2.C index ddf99aa..c8590b4 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-fn2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-fn2.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #define assert(E) if (!(E)) __builtin_abort(); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-fn3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-fn3.C index b25adcc..f332519 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-fn3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-fn3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept type = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-fn4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-fn4.C index 8a29ca9..4fca936 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-fn4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-fn4.C @@ -1,5 +1,5 @@ // Testcase from [expr.prim.id]/5 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct A { static void f(int) requires false; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-friend1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-friend1.C index e3740d5..fe80460 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-friend1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-friend1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Eq = requires(T t) { t == t; }; // { dg-message "in requirements" } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-friend2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-friend2.C index 6aa9d96..d5f700c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-friend2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-friend2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Eq = requires(T t) { t == t; }; // { dg-message "in requirements" } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-friend4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-friend4.C index 88f9fe8..90ab8f0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-friend4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-friend4.C @@ -1,5 +1,5 @@ // C++20 NB comment US115 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Any = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-iconv1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-iconv1.C index 4e2d13f..4ddf516 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-iconv1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-iconv1.C @@ -1,5 +1,5 @@ // PR c++/67240 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-diagnostics-depth=2" } template concept Same = __is_same_as(T,U); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor2.C index aa244bc..b858e27 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor4.C index 34eaf22..7fe930c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor6.C b/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor6.C index c92d6ac..ad29068 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor6.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor6.C @@ -1,5 +1,5 @@ // PR c++/91930 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct basic_mixin { basic_mixin() requires true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda1.C index ef19688..6159574 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda1.C @@ -1,5 +1,5 @@ // PR c++/82565 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct string { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda2.C index a7419d6..44b509d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept False = false; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda3.C index 96da785..291e451 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda3.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } template concept C1 = __is_same_as(T, int) diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda4.C index dfb5f3b..daaaf31 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct a {}; template using b = a; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda5.C b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda5.C index fe47189..ee9180e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda5.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda5.C @@ -1,5 +1,5 @@ // PR c++/92556 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Having this as a hard error is consistent with template argument deduction; // it's an open core issue (jason 2020-02-14). diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-locations1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-locations1.C index 6c81c14..c841dae 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-locations1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-locations1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-member-concept.C b/gcc/testsuite/g++.dg/cpp2a/concepts-member-concept.C index f3a2d06..cec45b4 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-member-concept.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-member-concept.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // FIXME: Diagnostics should be better. diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-memfun-err.C b/gcc/testsuite/g++.dg/cpp2a/concepts-memfun-err.C index acfa188..8867b7b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-memfun-err.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-memfun-err.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-memfun.C b/gcc/testsuite/g++.dg/cpp2a/concepts-memfun.C index f6ad519..77e10c6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-memfun.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-memfun.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-memtmpl1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-memtmpl1.C index ee28d5b..7ddfe62 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-memtmpl1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-memtmpl1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-noexcept1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-noexcept1.C index 418040a..987bf27 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-noexcept1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-noexcept1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } void f1(int); void f2(int) noexcept; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec4.C index 5ba3ab1..fb32726 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept is_int = __is_same_as(T,int); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec5.C b/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec5.C index f33f7496..8774d4f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec5.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec5.C @@ -1,5 +1,5 @@ // PR c++/67138 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Auto = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec6.C b/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec6.C index 2bb4bac..9e455d5 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec6.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec6.C @@ -1,5 +1,5 @@ // PR c++/67152 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept HasType = requires { typename T::type; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-placeholder1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-placeholder1.C index cbea81d..887fe4d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-placeholder1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-placeholder1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Same = __is_same_as(T, U); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-placeholder2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-placeholder2.C index b04354c..9e6fd16 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-placeholder2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-placeholder2.C @@ -1,5 +1,5 @@ // PR c++/94481 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept C = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65552.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65552.C index 5af2a40..7176efb 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65552.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65552.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Concept = diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65634.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65634.C index 52f24ec..54405f2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65634.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65634.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept C1 = diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65636.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65636.C index b99a343..1bcc051 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65636.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65636.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } using TD = int; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65848.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65848.C index b246d25..2868f9c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65848.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65848.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Performance test... This should be fast. diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65854.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65854.C index 53bb9a3..93dc32d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65854.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65854.C @@ -1,5 +1,5 @@ // PR c++/65854 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Handle alias templates in type requirements. diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr66844.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr66844.C index c32f4d1..afeee59 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr66844.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr66844.C @@ -1,5 +1,5 @@ // PR c++/66844 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Same = __is_same_as(T, U); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr66962.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr66962.C index ca57a09..c6dfe5d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr66962.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr66962.C @@ -1,5 +1,5 @@ // PR c++/66962 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct remove_cv; template struct is_reference; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67070.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67070.C index 88017dc..fbaac1c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67070.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67070.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept C1 = diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67147.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67147.C index db8c37e..1e83fba 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67147.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67147.C @@ -1,5 +1,5 @@ // PR c++/67147 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept IndirectCallableRelation = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67148.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67148.C index c593996..97f80cf 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67148.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67148.C @@ -1,5 +1,5 @@ // PR c++/67148 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } namespace std diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67178.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67178.C index 7154fc2..c74f6f0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67178.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67178.C @@ -1,5 +1,5 @@ // PR c++/67178 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept c = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67210.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67210.C index 044e677..a31750e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67210.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67210.C @@ -1,5 +1,5 @@ // PR c++/67210 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept C = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67217.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67217.C index 35618ae..b1a7a8c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67217.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67217.C @@ -1,5 +1,5 @@ // PR c++/67217 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template requires __is_same_as(T, double) diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-1.C index 500e631..d59d4f9 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-1.C @@ -1,5 +1,5 @@ // PR c++/67225 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-2.C index 6218176..f8d99ff 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-2.C @@ -1,5 +1,5 @@ // PR c++/67225 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-3.C index d08efb6..937098d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-3.C @@ -1,5 +1,5 @@ // PR c++/67225 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-4.C index 0ef5ed8..e37ad28 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-4.C @@ -1,5 +1,5 @@ // PR c++/67225 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-5.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-5.C index 9a25831f4..92f4298 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-5.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-5.C @@ -1,5 +1,5 @@ // PR c++/67225 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67319.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67319.C index 6eb1c44..5399780 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67319.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67319.C @@ -1,5 +1,5 @@ // PR c++/67319 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67427.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67427.C index fcad301..fad43be 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67427.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67427.C @@ -1,5 +1,5 @@ // PR c++/67427 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67654.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67654.C index 27ee205..5087344 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67654.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67654.C @@ -1,5 +1,5 @@ // PR c++/67427 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template struct and_c_impl { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67658.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67658.C index 087f4fc..530cb33 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67658.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67658.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template concept bool C1() { return false; } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67684.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67684.C index 35e9295..3924922 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67684.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67684.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67692.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67692.C index 139ecd6..c712d72 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67692.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67692.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template bool f(T x) { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67697.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67697.C index 44c077b..2708337 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67697.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67697.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67719.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67719.C index d28b445..c3c5c23 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67719.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67719.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template concept bool C() { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67774.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67774.C index d363c59..5ee5c2d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67774.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67774.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67825.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67825.C index fff414b..64cd9d2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67825.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67825.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67860.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67860.C index 8bad031..693237f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67860.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67860.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67862.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67862.C index 222e528..b42ce8b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67862.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67862.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } typedef int size_t; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67969.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67969.C index 4f2ab51..b809553 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67969.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67969.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template class NumericArray {}; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-1.C index bf95210..bc679a7 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-2.C index 91e3c80..2dd46da 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template concept bool True = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68372.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68372.C index d1416eb..9fc90ff 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68372.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68372.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68434.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68434.C index 23ecf4d..1fbda9f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68434.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68434.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept C1 = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68683.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68683.C index f11d69f..0a8715d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68683.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68683.C @@ -1,5 +1,5 @@ // PR c++/68683 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct is_same { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68812.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68812.C index 2d809e8..324b3ad 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68812.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68812.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } namespace zero diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr69235.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr69235.C index 5e96d0e..1df563b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr69235.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr69235.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr71368.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr71368.C index c67e632..d83440d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr71368.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr71368.C @@ -1,5 +1,5 @@ // PR c++/71368 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Same = __is_same_as(T,U); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr71385.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr71385.C index f31997c..aee27bc 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr71385.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr71385.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept convertible_to = requires(From (&f)(), void (&g)(To)) { g(f()); }; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr71965.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr71965.C index 4619cf9..cdad62c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr71965.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr71965.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Destructible = false; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr78752.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr78752.C index 40eeaa7..447b149 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr78752.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr78752.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr79759.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr79759.C index a99103c..5fdd64e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr79759.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr79759.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr80746.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr80746.C index 69e2fbe..1a0008e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr80746.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr80746.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr80773.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr80773.C index 34b96c5..92e89da 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr80773.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr80773.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr82507.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr82507.C index f743855..81a671c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr82507.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr82507.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr82740.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr82740.C index 6e0f062..01a42a4 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr82740.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr82740.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr84140.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr84140.C index 83a9083..b604f7e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr84140.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr84140.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } template constexpr bool is_same_v = false; template constexpr bool is_same_v = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr84551.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr84551.C index e40796f..ef1d278 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr84551.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr84551.C @@ -1,5 +1,5 @@ // PR c++/84551 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-g -O" } template concept C = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr84810.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr84810.C index b330e4b..8d7cb89 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr84810.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr84810.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template constexpr bool is_int = false; template<> constexpr bool is_int = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr85808.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr85808.C index bcba830..f32ca63 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr85808.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr85808.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } namespace X diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr86269.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr86269.C index 4428ee1..6fb430d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr86269.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr86269.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr87441.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr87441.C index bcd4ba5..28be9e9 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr87441.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr87441.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr88395.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr88395.C index ad24da9..1c25252 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr88395.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr88395.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Concept2 = requires (T t, U u) diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr92078.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr92078.C index 9bfb896..6df9b85 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr92078.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr92078.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct iterator_traits diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat1.C index ee83d56..22696c3 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Foo = requires(T t) { foo(t); }; // { dg-error "template instantiation depth" } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat2.C index d76f12e..992fcbb 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Fooable = requires(T t) { foo(t); }; // { dg-error "template instantiation depth" } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat3.C index b8ca916..679f5cf 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Fooable = requires(T t) { foo(t); }; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires1.C index 7afd34d..03668d3 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Class = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires10.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires10.C index bb0e3b0..0364d2e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires10.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires10.C @@ -1,5 +1,5 @@ // PR c++/66988 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct bool_constant { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires11.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires11.C index be6409e..816a37c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires11.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires11.C @@ -1,5 +1,5 @@ // PR c++/67018 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template constexpr bool Val = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires12.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires12.C index c8e3cfd..2d8c291 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires12.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires12.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct all_same { static constexpr bool value = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires13.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires13.C index 8ba3862..062d22c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires13.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires13.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept C = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires14.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires14.C index e2893c0..06908a4 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires14.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires14.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept A = sizeof(T) >= 4; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires15.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires15.C index 9b82061..27af524 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires15.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires15.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct string; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires16.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires16.C index b9532a3..cb2ac5d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires16.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires16.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // A poor mans Integral concept. template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires17.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires17.C index 1ec1d59..6b665ac 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires17.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires17.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Type = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires18.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires18.C index c977045..9d8ec94 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires18.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires18.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept integer = __is_same_as(T, int); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires19.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires19.C index 071a838..b020250 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires19.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires19.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept check_c = false; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires2.C index 282dba6..a9b422b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test the types of atomic constraints diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires20.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires20.C index 089db2b..5f7aec5 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires20.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires20.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template constexpr bool r () { return true; } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires21.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires21.C index 1d21cce7..bc38b89 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires21.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires21.C @@ -1,5 +1,5 @@ // PR c++/94480 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template constexpr bool is_same_v = __is_same (T, U); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires3.C index bbcba0d..292ce20 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test basic expression requirements diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires4.C index 61aa72d..3153afa 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test associated type requirements diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires5.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires5.C index 2f912b1..976efe6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires5.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires5.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts -fconcepts-diagnostics-depth=2" } // Test conversion requirements (not in C++20) diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires6.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires6.C index d989925..a4e4402 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires6.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test deduction requirements. diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires7.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires7.C index 89057c4..8101d03 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires7.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires7.C @@ -1,5 +1,5 @@ // PR c++/66758 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept C = requires (T t, U u) { t + u; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires8.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires8.C index 0d61a0a..0170042 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires8.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires8.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept C = requires (T t, U u) { t + u; }; // { dg-message "in requirements" } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires9.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires9.C index 3594176..c9ff9ca 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires9.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires9.C @@ -1,5 +1,5 @@ // PR c++/66832 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template requires requires (T& t, U &u) { t.foo(); u.foo(); } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-return-req1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-return-req1.C index 1d005f0..84c9ae9 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-return-req1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-return-req1.C @@ -1,5 +1,5 @@ // PR c++/92268 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Two = true; template concept One = Two; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm1.C index 4ff401a..39e0d7d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Int = __is_same_as(T, int); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm10.C b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm10.C index 239b485..047c19e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm10.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm10.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Dummy = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm2.C index 7c1d69b..3bb2f57 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Int = __is_same_as(T, int); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm5.C b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm5.C index 78b6f1c..46c50a6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm5.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm5.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Int = __is_same_as(T, int); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm6.C b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm6.C index 47c8ef7..c7d9964 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm6.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct are_same; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm8.C b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm8.C index adcffed..265d894 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm8.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm8.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm9.C b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm9.C index d578b35..00cc210 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm9.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm9.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-traits2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-traits2.C index 2bdd3d3..18baac4 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-traits2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-traits2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Nothrow_assignable = __has_nothrow_assign(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-ts1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-ts1.C index b3acec1..1cefe3b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-ts1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-ts1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } // This tests the terse notation. diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-ts2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-ts2.C index f731bac..d28002c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-ts2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-ts2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } // Basic tests using function concepts. diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-ts3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-ts3.C index 434a5e2..9d47a7a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-ts3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-ts3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } // Basic tests using variable concepts. diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-ts4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-ts4.C index aa96621..23ed929 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-ts4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-ts4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } // Basic tests for introduction syntax. diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-ts5.C b/gcc/testsuite/g++.dg/cpp2a/concepts-ts5.C index cdc40df..0624488 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-ts5.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-ts5.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } struct Base { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-ts6.C b/gcc/testsuite/g++.dg/cpp2a/concepts-ts6.C index bf665aa..597ad5e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-ts6.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-ts6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template concept bool C1 = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-using1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-using1.C index 733382d..adfecf8 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-using1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-using1.C @@ -1,5 +1,5 @@ // PR c++/79591 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept True = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts.C b/gcc/testsuite/g++.dg/cpp2a/concepts.C index 5839207..ebeeebf 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Change in grammar for the expression trailing `requires`. template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts1.C b/gcc/testsuite/g++.dg/cpp2a/concepts1.C index a99343f..87adf8c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept Class = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts2.C b/gcc/testsuite/g++.dg/cpp2a/concepts2.C index d3b45f7..04e7ee6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept True = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts3.C b/gcc/testsuite/g++.dg/cpp2a/concepts3.C index 34dacad..4ccfd08 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template concept same_as = __is_same_as(T,U); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts4.C b/gcc/testsuite/g++.dg/cpp2a/concepts4.C index 388fad7..5f08ae3 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct A { static const int x = 42; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts5.C b/gcc/testsuite/g++.dg/cpp2a/concepts5.C index 24ac2aa..ed8028f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts5.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts5.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts6.C b/gcc/testsuite/g++.dg/cpp2a/concepts6.C index d69628b..0524bb9 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts6.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace a { diff --git a/gcc/testsuite/g++.dg/cpp2a/cond-triv2.C b/gcc/testsuite/g++.dg/cpp2a/cond-triv2.C index 554f8a3..531ec1c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/cond-triv2.C +++ b/gcc/testsuite/g++.dg/cpp2a/cond-triv2.C @@ -1,5 +1,5 @@ // PR c++/67348 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include #include diff --git a/gcc/testsuite/g++.dg/cpp2a/consteval-void1.C b/gcc/testsuite/g++.dg/cpp2a/consteval-void1.C index 783cf4c..b572650 100644 --- a/gcc/testsuite/g++.dg/cpp2a/consteval-void1.C +++ b/gcc/testsuite/g++.dg/cpp2a/consteval-void1.C @@ -1,5 +1,5 @@ // PR c++/93257 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template consteval void test() {} diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor2.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor2.C index 397cfb0..7b3903c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor2.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor2.C @@ -1,5 +1,5 @@ // P0784R7 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C index d946183..193ae93 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C @@ -1,5 +1,5 @@ // P0784R7 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor4.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor4.C index 68ad69c..ad03987 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor4.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor4.C @@ -1,5 +1,5 @@ // PR c++/92414 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { virtual void foo (); }; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic1.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic1.C index e8ba63d..c37753b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic1.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic1.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Downcast. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic10.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic10.C index c226292..f9f8223 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic10.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic10.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Virtual base. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic11.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic11.C index 8dfa03a..9ee93c3 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic11.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic11.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } // dynamic_cast in a constructor. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic12.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic12.C index 0ce9beb..4aedf98 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic12.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic12.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // dynamic_cast in a destructor. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic13.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic13.C index 203067a..1df0772 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic13.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic13.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Adopted from g++.old-deja/g++.other/dyncast1.C. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic14.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic14.C index f739c6d..cc1cada 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic14.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic14.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Adopted from g++.old-deja/g++.other/dyncast1.C. // But use reference dynamic_cast. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic15.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic15.C index fcf5072..aed95c2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic15.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic15.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test HINT = -3 (SRC is a multiple public non-virtual base of DST). struct A { virtual void a() {} }; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic16.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic16.C index f0394d1..1d2b8cb 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic16.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic16.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Here the hint turns out to be wrong: A is a public base of B2, but the // dynamic_cast operand is not that subobject, but rather a sibling base of // B2. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic17.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic17.C index c574e75..a26678e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic17.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic17.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } // dynamic_cast in a constructor. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic18.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic18.C index 346f9f5..25d98c2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic18.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic18.C @@ -1,5 +1,5 @@ // PR c++/93414 - poor diagnostic for dynamic_cast in constexpr context. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Here 'b' doesn't point/refer to a public base of Derived. struct Base { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic2.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic2.C index aae03f6..2e5ea0e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic2.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic2.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Downcast, with hint > 0. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic3.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic3.C index c3e0980..9caeb24 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic3.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic3.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Sidecast. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic4.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic4.C index 6f42d20..da647bf 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic4.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic4.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } // From clang's constant-expression-cxx2a.cpp. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic5.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic5.C index 743b301..77c7043 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic5.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic5.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Multiple levels. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic6.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic6.C index 2343473..d67c307 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic6.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic6.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Private base. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic7.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic7.C index d71497a..bc3efd0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic7.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic7.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Protected base. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic8.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic8.C index 8056f30..1958cae 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic8.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic8.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Unrelated type. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic9.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic9.C index d8cbb2f..7d42ffa 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic9.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic9.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Ambiguous base. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init1.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init1.C index ab7b89d..75984a2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init1.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init1.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test basic use. struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init10.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init10.C index 74bf8e6..3834457 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init10.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init10.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // In c++2a we don't emit a call to _ZN3FooI3ArgEC1Ev. struct Arg; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init11.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init11.C index 1c7836a..79ad618 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init11.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init11.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { int i; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init12.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init12.C index 7d3d372..4eb8753 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init12.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init12.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { int uninit; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init13.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init13.C index 3d4460a..96140e6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init13.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init13.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct E { }; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init14.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init14.C index 6ab6abf..1335e51 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init14.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init14.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct E { constexpr E() = default; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init15.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init15.C index f80d3f2..3cfc23a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init15.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init15.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct E { constexpr E() = default; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init16.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init16.C index 16db297..87de38a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init16.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init16.C @@ -1,5 +1,5 @@ // PR c++/93803 - ICE with constexpr init and [[no_unique_address]]. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct empty { }; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init17.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init17.C index 34d9fe5..ec362ad 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init17.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init17.C @@ -1,5 +1,5 @@ // PR c++/93803 - ICE with constexpr init and [[no_unique_address]]. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct empty { }; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init2.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init2.C index 541da1c..d0d0411 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init2.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init2.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init3.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init3.C index dd27352..1c0c018 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init3.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init3.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init4.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init4.C index dd614ed..78f3ebd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init4.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init4.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // This bullet in [dcl.constexpr] is now gone: // - every non-static data member and base class sub-object shall be initialized diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init5.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init5.C index 0d21f26..a9e717d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init5.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init5.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { int i; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init6.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init6.C index a2994f5..a1634aa 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init6.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init6.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } /* We used to get the "constexpr constructor for union S:: must initialize exactly one non-static data member" error, but not anymore diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init7.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init7.C index dd2741e..2e62b53 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init7.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init7.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { int a = 1; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init8.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init8.C index 0d5a4a7..8bb9a9c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init8.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init8.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { constexpr S(int) {} diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init9.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init9.C index b44098c..1ac14c2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init9.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init9.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { constexpr S(int) {} diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new1.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new1.C index 5d1b7ef..a936c1e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new1.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new1.C @@ -1,5 +1,5 @@ // P0784R7 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } struct S { constexpr S () : s (5) {} constexpr S (int x) : s (x) {} int s; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new10.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new10.C index bc5e6e5..6f6b11c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new10.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new10.C @@ -1,5 +1,5 @@ // PR c++/91369 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new11.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new11.C index 2bf359a..5adf13e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new11.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new11.C @@ -1,5 +1,5 @@ // PR c++/93633 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new12.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new12.C index 04f7597..fcf398f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new12.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new12.C @@ -1,5 +1,5 @@ // PR c++/93633 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new13.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new13.C index 2121903..6762c24 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new13.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new13.C @@ -1,5 +1,5 @@ // PR c++/93633 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { constexpr A () : a (0) {} diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new2.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new2.C index d3733e8..0c513bd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new2.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new2.C @@ -1,5 +1,5 @@ // P0784R7 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } template diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new3.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new3.C index 6e7880a..70b8412 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new3.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new3.C @@ -1,5 +1,5 @@ // P0784R7 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } constexpr int * diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new4.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new4.C index b9bd5ea..4be1bf0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new4.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new4.C @@ -1,5 +1,5 @@ // P0784R7 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } struct S diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new5.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new5.C index b2b65f2..2bb407a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new5.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new5.C @@ -1,5 +1,5 @@ // P0784R7 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new6.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new6.C index 5c0c2b6..d51bdbb 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new6.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new6.C @@ -1,5 +1,5 @@ // P0784R7 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new7.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new7.C index 5fc130e..bb60a8e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new7.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new7.C @@ -1,5 +1,5 @@ // P0784R7 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new8.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new8.C index f13da10..e61323a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new8.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new8.C @@ -1,5 +1,5 @@ // PR c++/91369 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new9.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new9.C index f99f080..db45cdf 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new9.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new9.C @@ -1,5 +1,5 @@ // PR c++/91369 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid1.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid1.C index a81f649..32f63a5 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid1.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid1.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test non-polymorphic type. #include diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid2.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid2.C index 51c8fb4..495914f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid2.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid2.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test polymorphic type. #include diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid3.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid3.C index 38b9e60..e58026a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid3.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid3.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test typeid in a template. #include diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-union1.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-union1.C index c38167a..ac8aa5f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-union1.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-union1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } union U { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual14.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual14.C index b29d3f6..db00a3f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual14.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual14.C @@ -1,5 +1,5 @@ // PR c++/92695 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { virtual int get () = 0; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual15.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual15.C index cb55aa3..88229cf 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual15.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual15.C @@ -1,5 +1,5 @@ // PR c++/92695 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { virtual int get() = 0; }; struct B : A { constexpr int get() override { return 10; } }; diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit1.C b/gcc/testsuite/g++.dg/cpp2a/constinit1.C index 9d1c028..1dc00ea 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit1.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit1.C @@ -1,5 +1,5 @@ // PR c++/91360 - Implement C++20 P1143R2: constinit -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test basic usage of 'constinit'. const char *g() { return "dynamic init"; } diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit10.C b/gcc/testsuite/g++.dg/cpp2a/constinit10.C index a50f285..b678788 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit10.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit10.C @@ -1,5 +1,5 @@ // PR c++/91360 - Implement C++20 P1143R2: constinit -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // From PR83428. struct S1 diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit11.C b/gcc/testsuite/g++.dg/cpp2a/constinit11.C index ab3715b..e8b3bcb 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit11.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit11.C @@ -1,5 +1,5 @@ // PR c++/91360 - Implement C++20 P1143R2: constinit -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } int foo (); constexpr int constfoo () { return 42; } diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit12.C b/gcc/testsuite/g++.dg/cpp2a/constinit12.C index b5b736f..cc6569b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit12.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit12.C @@ -1,5 +1,5 @@ // PR c++/91360 - Implement C++20 P1143R2: constinit -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { S(int) { } diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit14.C b/gcc/testsuite/g++.dg/cpp2a/constinit14.C index 72bfab6..86a058b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit14.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit14.C @@ -1,5 +1,5 @@ // PR c++/92134 - constinit malfunction in static data member. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct Value { Value() : v{new int{42}} {} diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit15.C b/gcc/testsuite/g++.dg/cpp2a/constinit15.C index 3259433..29e8b51 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit15.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit15.C @@ -1,5 +1,5 @@ // PR c++/92058 - constinit malfunction in static data member. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct B { B() {} diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit3.C b/gcc/testsuite/g++.dg/cpp2a/constinit3.C index 1db16fe..a29c594 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit3.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit3.C @@ -1,5 +1,5 @@ // PR c++/91360 - Implement C++20 P1143R2: constinit -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } constinit constinit int v1; // { dg-error "duplicate .constinit." } constexpr constinit int v2 = 1; // { dg-error "can use at most one of the .constinit. and .constexpr. specifiers" } diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit4.C b/gcc/testsuite/g++.dg/cpp2a/constinit4.C index 748a7ff..0630e18 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit4.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit4.C @@ -1,5 +1,5 @@ // PR c++/91360 - Implement C++20 P1143R2: constinit -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { }; constinit extern S s; diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit5.C b/gcc/testsuite/g++.dg/cpp2a/constinit5.C index 3d21f48..951c6fe 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit5.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit5.C @@ -1,5 +1,5 @@ // PR c++/91360 - Implement C++20 P1143R2: constinit -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Check that we preserve DECL_DECLARED_CONSTINIT_P in duplicate_decls. int gl = 42; diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit8.C b/gcc/testsuite/g++.dg/cpp2a/constinit8.C index c6b2975..50bc13f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit8.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit8.C @@ -1,5 +1,5 @@ // PR c++/91360 - Implement C++20 P1143R2: constinit -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Variable templates. int nonconst; diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit9.C b/gcc/testsuite/g++.dg/cpp2a/constinit9.C index 4c7f8925..9c5c848 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit9.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit9.C @@ -1,5 +1,5 @@ // PR c++/91360 - Implement C++20 P1143R2: constinit -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } // A run-time test. constexpr int foo (int x) { return x; } diff --git a/gcc/testsuite/g++.dg/cpp2a/desig13.C b/gcc/testsuite/g++.dg/cpp2a/desig13.C index 442e8b7..a931e34 100644 --- a/gcc/testsuite/g++.dg/cpp2a/desig13.C +++ b/gcc/testsuite/g++.dg/cpp2a/desig13.C @@ -11,6 +11,6 @@ void baz () { foo ({.d = 5, 6, .b = 2, 3}); // { dg-error "designator order for field 'S::b' does not match declaration order in 'S'" } - // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++2a } .-1 } + // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++20 } .-1 } bar ({.b = 1, .a = 2}); // { dg-error "designator order for field 'T::a' does not match declaration order in 'T'" } } diff --git a/gcc/testsuite/g++.dg/cpp2a/desig2.C b/gcc/testsuite/g++.dg/cpp2a/desig2.C index 7a03618..c993134 100644 --- a/gcc/testsuite/g++.dg/cpp2a/desig2.C +++ b/gcc/testsuite/g++.dg/cpp2a/desig2.C @@ -5,8 +5,8 @@ struct S { int a, b, c; }; S a = { 1, 2, 3 }; S b = { .a = 1, .b = 2, .c = 3 }; -S c = { 1, .b = 2, .c = 3 }; // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++2a } } -S d = { .a = 1, 2, 3 }; // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++2a } } +S c = { 1, .b = 2, .c = 3 }; // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++20 } } +S d = { .a = 1, 2, 3 }; // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++20 } } S e = { .b = 1, .b = 2 }; // { dg-error "designator used multiple times in the same initializer list" } #if __cplusplus > 201103L @@ -14,6 +14,6 @@ template void foo () { - S f = { .a = N... }; // { dg-error "'...' not allowed in designated initializer list" "" { target c++2a } } + S f = { .a = N... }; // { dg-error "'...' not allowed in designated initializer list" "" { target c++20 } } } #endif diff --git a/gcc/testsuite/g++.dg/cpp2a/destroying-delete1.C b/gcc/testsuite/g++.dg/cpp2a/destroying-delete1.C index 329588b..210a5a5 100644 --- a/gcc/testsuite/g++.dg/cpp2a/destroying-delete1.C +++ b/gcc/testsuite/g++.dg/cpp2a/destroying-delete1.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/destroying-delete2.C b/gcc/testsuite/g++.dg/cpp2a/destroying-delete2.C index 2592c07..10cb80ac 100644 --- a/gcc/testsuite/g++.dg/cpp2a/destroying-delete2.C +++ b/gcc/testsuite/g++.dg/cpp2a/destroying-delete2.C @@ -1,5 +1,5 @@ // PR c++/88969 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/destroying-delete3.C b/gcc/testsuite/g++.dg/cpp2a/destroying-delete3.C index 112fb0a..9cc495e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/destroying-delete3.C +++ b/gcc/testsuite/g++.dg/cpp2a/destroying-delete3.C @@ -1,5 +1,5 @@ // PR c++/88969 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/destroying-delete4.C b/gcc/testsuite/g++.dg/cpp2a/destroying-delete4.C index c122cee..2bf0c09 100644 --- a/gcc/testsuite/g++.dg/cpp2a/destroying-delete4.C +++ b/gcc/testsuite/g++.dg/cpp2a/destroying-delete4.C @@ -1,5 +1,5 @@ // PR c++/90171 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/explicit14.C b/gcc/testsuite/g++.dg/cpp2a/explicit14.C index 9c3acc3..3e510fe 100644 --- a/gcc/testsuite/g++.dg/cpp2a/explicit14.C +++ b/gcc/testsuite/g++.dg/cpp2a/explicit14.C @@ -1,5 +1,5 @@ // PR c++/89420 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/explicit15.C b/gcc/testsuite/g++.dg/cpp2a/explicit15.C index e0058f6..939456c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/explicit15.C +++ b/gcc/testsuite/g++.dg/cpp2a/explicit15.C @@ -1,5 +1,5 @@ // PR c++/89836 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct W { constexpr explicit operator bool() { return true; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/inline-asm2.C b/gcc/testsuite/g++.dg/cpp2a/inline-asm2.C index 6038c11..874e4cd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/inline-asm2.C +++ b/gcc/testsuite/g++.dg/cpp2a/inline-asm2.C @@ -1,6 +1,6 @@ // P1668R1: Permit unevaluated inline asm in constexpr functions // PR c++/91346 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } constexpr int foo (bool b) diff --git a/gcc/testsuite/g++.dg/cpp2a/inline-asm3.C b/gcc/testsuite/g++.dg/cpp2a/inline-asm3.C index b636e3b..a7476b1 100644 --- a/gcc/testsuite/g++.dg/cpp2a/inline-asm3.C +++ b/gcc/testsuite/g++.dg/cpp2a/inline-asm3.C @@ -1,5 +1,5 @@ // P1668R1: Permit unevaluated inline asm in constexpr functions -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-Wno-pedantic" } constexpr int diff --git a/gcc/testsuite/g++.dg/cpp2a/is-constant-evaluated9.C b/gcc/testsuite/g++.dg/cpp2a/is-constant-evaluated9.C index 3783369..0e96a1a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/is-constant-evaluated9.C +++ b/gcc/testsuite/g++.dg/cpp2a/is-constant-evaluated9.C @@ -1,5 +1,5 @@ // PR c++/91428 - warn about std::is_constant_evaluated in if constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-Wtautological-compare" } namespace std { diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-generic-variadic20.C b/gcc/testsuite/g++.dg/cpp2a/lambda-generic-variadic20.C index 3d69dbb..ab1a4e4 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-generic-variadic20.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-generic-variadic20.C @@ -1,5 +1,5 @@ // PR c++/94546 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template T&& forward(T&& t) { return static_cast(t); } diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-generic5.C b/gcc/testsuite/g++.dg/cpp2a/lambda-generic5.C index e608e95..4430611 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-generic5.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-generic5.C @@ -3,4 +3,4 @@ // { dg-options "-std=c++2a" } int j = [](T t, int i) { return i; }(3, 4); -// { dg-bogus "lambda templates are only available with" "" { target c++2a } .-1 } +// { dg-bogus "lambda templates are only available with" "" { target c++20 } .-1 } diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-generic7.C b/gcc/testsuite/g++.dg/cpp2a/lambda-generic7.C index bedba68..de45742 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-generic7.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-generic7.C @@ -1,5 +1,5 @@ // PR c++/94507 - ICE-on-invalid with lambda template. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { }; diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-mangle.C b/gcc/testsuite/g++.dg/cpp2a/lambda-mangle.C index 8ee9b03..35abc91 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-mangle.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-mangle.C @@ -1,5 +1,5 @@ // Test lambda mangling -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-require-weak "" } // { dg-options "-fno-inline" } diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init1.C b/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init1.C index 89c6353..e5942ac 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init1.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } void bar(); void bar(int); diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init2.C b/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init2.C index 55d689d..e950d65 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init2.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init2.C @@ -1,5 +1,5 @@ // PR c++/89686 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template void foo(Ts... xs) diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init4.C b/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init4.C index e7c815b..b49e26d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init4.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init4.C @@ -1,5 +1,5 @@ // P2095R0 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "" } template diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init5.C b/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init5.C index 492fc47..5fcf41b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init5.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init5.C @@ -1,5 +1,5 @@ // PR c++/94483 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template constexpr auto x1 = [...z = -a] (auto F) { return F(z...); }; diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-this3.C b/gcc/testsuite/g++.dg/cpp2a/lambda-this3.C index b2d30d6..3e00e68 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-this3.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-this3.C @@ -6,8 +6,8 @@ struct X { int x; void foo (int n) { auto a1 = [=] { x = n; }; // { dg-bogus "implicit capture" "" { target c++17_down } } - // { dg-warning "implicit capture of 'this' via '\\\[=\\\]' is deprecated" "" { target c++2a } .-1 } - // { dg-message "add explicit 'this' or '\\\*this' capture" "" { target c++2a } .-2 } + // { dg-warning "implicit capture of 'this' via '\\\[=\\\]' is deprecated" "" { target c++20 } .-1 } + // { dg-message "add explicit 'this' or '\\\*this' capture" "" { target c++20 } .-2 } auto a2 = [=, this] { x = n; }; // { dg-warning "explicit by-copy capture" "" { target c++17_down } .-1 } auto a3 = [=, *this]() mutable { x = n; }; @@ -16,14 +16,14 @@ struct X { auto a6 = [&, *this]() mutable { x = n; }; auto a7 = [=] { // { dg-bogus "implicit capture" "" { target c++17_down } } - // { dg-warning "implicit capture of 'this' via '\\\[=\\\]' is deprecated" "" { target c++2a } .-1 } - // { dg-message "add explicit 'this' or '\\\*this' capture" "" { target c++2a } .-2 } + // { dg-warning "implicit capture of 'this' via '\\\[=\\\]' is deprecated" "" { target c++20 } .-1 } + // { dg-message "add explicit 'this' or '\\\*this' capture" "" { target c++20 } .-2 } auto a = [=] { // { dg-bogus "implicit capture" "" { target c++17_down } } - // { dg-warning "implicit capture of 'this' via '\\\[=\\\]' is deprecated" "" { target c++2a } .-1 } - // { dg-message "add explicit 'this' or '\\\*this' capture" "" { target c++2a } .-2 } + // { dg-warning "implicit capture of 'this' via '\\\[=\\\]' is deprecated" "" { target c++20 } .-1 } + // { dg-message "add explicit 'this' or '\\\*this' capture" "" { target c++20 } .-2 } auto a2 = [=] { x = n; }; // { dg-bogus "implicit capture" "" { target c++17_down } } - // { dg-warning "implicit capture of 'this' via '\\\[=\\\]' is deprecated" "" { target c++2a } .-1 } - // { dg-message "add explicit 'this' or '\\\*this' capture" "" { target c++2a } .-2 } + // { dg-warning "implicit capture of 'this' via '\\\[=\\\]' is deprecated" "" { target c++20 } .-1 } + // { dg-message "add explicit 'this' or '\\\*this' capture" "" { target c++20 } .-2 } }; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval1.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval1.C index 8a17033..816b6e9 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval1.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } typedef decltype([]{}) C; // the closure type has no name for linkage purposes diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval11.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval11.C index a042624..01ad27f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval11.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval11.C @@ -1,5 +1,5 @@ // PR c++/92010 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template void spam(decltype([]{}) (*s)[sizeof(T)] = nullptr) { } diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval12.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval12.C index 24d2e70..c66c6f8 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval12.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval12.C @@ -1,5 +1,5 @@ // PR c++/94521 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template void spam(decltype([]{}) *s) diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval2.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval2.C index f29a59e..d8b20bd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval2.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // ill-formed, no diagnostic required: the two expressions are // functionally equivalent but not equivalent diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval3.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval3.C index 3c9b1e1..994d184 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval3.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template void foo(const char (*s)[([]{}, N)]) {} template void spam(decltype([]{}) (*s)[sizeof(T)]) {} diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval4.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval4.C index e75a127..f122739 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval4.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval4.C @@ -1,4 +1,4 @@ -// { dg-do link { target c++2a } } +// { dg-do link { target c++20 } } template T f(T t) { return t; } using L = decltype([]{ return f(42); }); diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval5.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval5.C index 7fb05c3..dc19004 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval5.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval5.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } using L = decltype([]{ }); void f(L) { } diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval6.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval6.C index 0396f9f..7d5aa31 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval6.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } static decltype([] { }) f(); static decltype([] { }) f(); // { dg-error "ambiguating" } diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval7.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval7.C index 4102882..efe3691 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval7.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval7.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct A { }; diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval8.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval8.C index 3692154..966da0c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval8.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval8.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval9.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval9.C index e32d447..f512ae7 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval9.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval9.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } // { dg-additional-sources "lambda-uneval9.cc" } #include "lambda-uneval9.h" diff --git a/gcc/testsuite/g++.dg/cpp2a/multiple-deleted-destroying-delete-error-1.C b/gcc/testsuite/g++.dg/cpp2a/multiple-deleted-destroying-delete-error-1.C index 01e4142..e7024ba 100644 --- a/gcc/testsuite/g++.dg/cpp2a/multiple-deleted-destroying-delete-error-1.C +++ b/gcc/testsuite/g++.dg/cpp2a/multiple-deleted-destroying-delete-error-1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include @@ -8,5 +8,5 @@ namespace delete_selection_d { void operator delete(B *, std::destroying_delete_t) = delete; }; void delete_B(B *b) { delete b; } // { dg-bogus "deleted .* deleted" } - // { dg-error "deleted" "" { target c++2a } .-1 } + // { dg-error "deleted" "" { target c++20 } .-1 } } diff --git a/gcc/testsuite/g++.dg/cpp2a/multiple-deleted-destroying-delete-error-2.C b/gcc/testsuite/g++.dg/cpp2a/multiple-deleted-destroying-delete-error-2.C index 314e2e9..5db55c4 100644 --- a/gcc/testsuite/g++.dg/cpp2a/multiple-deleted-destroying-delete-error-2.C +++ b/gcc/testsuite/g++.dg/cpp2a/multiple-deleted-destroying-delete-error-2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include @@ -8,5 +8,5 @@ namespace delete_selection_r { void operator delete(void*) = delete; }; void delete_B(B *b) { delete b; } // { dg-bogus "deleted .* deleted" } - // { dg-error "deleted" "" { target c++2a } .-1 } + // { dg-error "deleted" "" { target c++20 } .-1 } } diff --git a/gcc/testsuite/g++.dg/cpp2a/nested-inline-ns2.C b/gcc/testsuite/g++.dg/cpp2a/nested-inline-ns2.C index 9b5f2ca..a1cbe52 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nested-inline-ns2.C +++ b/gcc/testsuite/g++.dg/cpp2a/nested-inline-ns2.C @@ -1,5 +1,5 @@ // P1094R2 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } inline namespace A::B { // { dg-error "a nested namespace definition cannot be inline" } int i; diff --git a/gcc/testsuite/g++.dg/cpp2a/no_unique_address1.C b/gcc/testsuite/g++.dg/cpp2a/no_unique_address1.C index dd01939..9cc8b94 100644 --- a/gcc/testsuite/g++.dg/cpp2a/no_unique_address1.C +++ b/gcc/testsuite/g++.dg/cpp2a/no_unique_address1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } [[no_unique_address]] struct B { }; // { dg-warning "attribute" } [[no_unique_address]] int i; // { dg-warning "attribute" } diff --git a/gcc/testsuite/g++.dg/cpp2a/nodiscard-constructor.c b/gcc/testsuite/g++.dg/cpp2a/nodiscard-constructor.c index a5c2c65..9af4e59 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nodiscard-constructor.c +++ b/gcc/testsuite/g++.dg/cpp2a/nodiscard-constructor.c @@ -1,5 +1,5 @@ /* nodiscard attribute tests */ -/* { dg-do compile { target c++2a } } */ +/* { dg-do compile { target c++20 } } */ /* { dg-options "-O -ftrack-macro-expansion=0" } */ struct A { [[nodiscard("bad constructor")]] A() {} }; diff --git a/gcc/testsuite/g++.dg/cpp2a/nodiscard-once.C b/gcc/testsuite/g++.dg/cpp2a/nodiscard-once.C index 7834971..c810fd0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nodiscard-once.C +++ b/gcc/testsuite/g++.dg/cpp2a/nodiscard-once.C @@ -1,5 +1,5 @@ /* nodiscard attribute tests */ -/* { dg-do compile { target c++2a } } */ +/* { dg-do compile { target c++20 } } */ /* { dg-options "-O -ftrack-macro-expansion=0" } */ [[nodiscard, nodiscard]] int check1 (void); /* { dg-error "nodiscard\[^\n\r]*can appear at most once" } */ diff --git a/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-nonstring.C b/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-nonstring.C index 76692e7..d81baf0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-nonstring.C +++ b/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-nonstring.C @@ -1,5 +1,5 @@ /* nodiscard attribute tests */ -/* { dg-do compile { target c++2a } } */ +/* { dg-do compile { target c++20 } } */ /* { dg-options "-O -ftrack-macro-expansion=0" } */ [[nodiscard(123)]] int check1 (void); /* { dg-error "nodiscard\[^\n\r]*must be a string constant" } */ diff --git a/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-only-one.C b/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-only-one.C index d42f4dc..6104a5f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-only-one.C +++ b/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-only-one.C @@ -1,5 +1,5 @@ /* nodiscard attribute tests */ -/* { dg-do compile { target c++2a } } */ +/* { dg-do compile { target c++20 } } */ /* { dg-options "-O -ftrack-macro-expansion=0" } */ [[nodiscard("not", "allowed")]] int check1 (void); /* { dg-error "wrong number of arguments.\[^\n\r]*nodiscard" } */ diff --git a/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason.C b/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason.C index 5fda058..2db2303 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason.C +++ b/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason.C @@ -1,5 +1,5 @@ /* nodiscard attribute tests, adapted from gcc.dg/attr-warn-unused-result.c. */ -/* { dg-do compile { target c++2a } } */ +/* { dg-do compile { target c++20 } } */ /* { dg-options "-O -ftrack-macro-expansion=0" } */ #define NODIS [[nodiscard("exact_message")]] diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class1.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class1.C index a3334fc..8f3b329 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class1.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } struct A diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class10.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class10.C index 5cc1793..31520c8 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class10.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class10.C @@ -1,5 +1,5 @@ // PR c++/88196 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct C { C *c; }; template struct D; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class11.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class11.C index 8a06d23..502a835 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class11.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class11.C @@ -1,5 +1,5 @@ // PR c++/88538 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { unsigned a; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class12.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class12.C index 11f8c12..824f0b4 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class12.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class12.C @@ -1,5 +1,5 @@ // PR c++/88744 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #define SA(X) static_assert((X),#X) diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class13.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class13.C index 14c601b..035dbb1 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class13.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class13.C @@ -1,5 +1,5 @@ // PR c++/77304 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S {}; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class14.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class14.C index 9cc1446..3d451a9 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class14.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class14.C @@ -1,5 +1,5 @@ // PR c++/89532 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct tuple; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class15.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class15.C index d684785..1142974 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class15.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class15.C @@ -1,7 +1,7 @@ // PR c++/89833 // Test to verify that the same specializations on non-type template // parameters of class types are in fact treated as the same. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A1 { char c[5]; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class16.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class16.C index 3afb5d2..8ed742f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class16.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class16.C @@ -2,7 +2,7 @@ // Test to verify that arrays of null pointer to members used as // non-type template arguments are interprested as null regardless // of the form of their initialization. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-O2 -Wall -fdump-tree-optimized" } struct A { int i; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class17.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class17.C index ca5f68e..2e14339 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class17.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class17.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct S { }; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class18.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class18.C index 22f4788..5319ca1 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class18.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class18.C @@ -1,5 +1,5 @@ // PR c++/90101 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct A; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class19.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class19.C index 91267ac..fe87ffc 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class19.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class19.C @@ -1,5 +1,5 @@ // PR c++/90099 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct Unit { int value; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class2.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class2.C index 2785f94..6811c27 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class2.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int i; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class20.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class20.C index 5d3479c..4b4d329 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class20.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class20.C @@ -1,5 +1,5 @@ // PR c++/90098 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int value; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class21.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class21.C index c58fe05..7f3d362 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class21.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class21.C @@ -1,5 +1,5 @@ // PR c++/90101 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct A{}; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class22.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class22.C index 026855f..193095b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class22.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class22.C @@ -1,5 +1,5 @@ // PR c++/90100 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template inline constexpr bool is_nontype_list = false; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class23.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class23.C index ab9e80f..134d1bf 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class23.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class23.C @@ -3,7 +3,7 @@ // parameters of class types are in fact treated as the same. Unlike // nontype-class15.C which involves only one-dimensional arrays this // test involves arrays of arrays and arrays of structs. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct AA3 { diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class24.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class24.C index aa96de3..6c703b7 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class24.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class24.C @@ -1,5 +1,5 @@ // PR c++/92150 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct X { int value; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class25.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class25.C index 67d6f09..279d4d0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class25.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class25.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct base { int i{}; }; struct derived : private base {}; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class26.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class26.C index 315e0ac..7707f43 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class26.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class26.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct p { unsigned p_ {}; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class27.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class27.C index 23eae64..ae64fac 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class27.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class27.C @@ -1,5 +1,5 @@ // PR c++/92965 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template class TS { diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class28.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class28.C index 80b9b49..a8b05fe 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class28.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class28.C @@ -1,5 +1,5 @@ // PR c++/92948 - Fix class NTTP with template arguments. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { constexpr A(int) { } diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class29.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class29.C index 2d2e969..a3c1446 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class29.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class29.C @@ -1,5 +1,5 @@ // PR c++/92948 - Fix class NTTP with template arguments. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } struct A { int i; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class3.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class3.C index 0c0fcf6..750accd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class3.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int i; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class30.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class30.C index b2e174c..44b8338 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class30.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class30.C @@ -1,5 +1,5 @@ // PR c++/91754 - Fix template arguments comparison with class NTTP. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S {}; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class31.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class31.C index 329b312..dbecf91 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class31.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class31.C @@ -1,5 +1,5 @@ // PR c++/88092 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class32.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class32.C index 6a4dac5..9c6d6f9 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class32.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class32.C @@ -1,5 +1,5 @@ // PR c++/88819 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template class TT, class R = TT <0>> struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class33.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class33.C index 1b9dfb8..7a1b9e6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class33.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class33.C @@ -1,5 +1,5 @@ // PR c++/90938 - Initializing array with {1} works, but not {0} -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-Wall" } struct A { int i; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class34.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class34.C index 2d3ba01..acbc621 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class34.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class34.C @@ -1,5 +1,5 @@ // PR c++/94592 - ICE with { } as template argument. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { constexpr A() {} diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class35.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class35.C index 78cf0a3..7d0126c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class35.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class35.C @@ -1,5 +1,5 @@ // PR c++/94592 - ICE with { } as template argument. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int i; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class36.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class36.C index 1c1e23c..8371eb9 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class36.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class36.C @@ -1,5 +1,5 @@ /* PR c++/94510 - nullptr_t implicitly cast to zero twice in std::array - { dg-do compile { target c++2a } } + { dg-do compile { target c++20 } } { dg-options "-Wall" } */ struct A { int i; int f (); }; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class37.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class37.C index 5649fa2..f5e9826 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class37.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class37.C @@ -1,5 +1,5 @@ /* PR c++/94510 - nullptr_t implicitly cast to zero twice in std::array - { dg-do compile { target c++2a } } + { dg-do compile { target c++20 } } { dg-options "-Wall" } */ struct A { char a[4]; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class4.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class4.C index fc0e7c9..6235fc8 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class4.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class5.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class5.C index 8c39cd7..67c5709 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class5.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class5.C @@ -1,5 +1,5 @@ // Example from P0732 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template class X { /* ... */ diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class6.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class6.C index 246fab6..377a151 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class6.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { char ar[10]; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class7.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class7.C index 15389e1..436f4fd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class7.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class7.C @@ -1,5 +1,5 @@ // Example from P0732. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { using size_t = decltype(sizeof(1)); diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class8.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class8.C index 47fc9c7..af22a93 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class8.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class8.C @@ -1,7 +1,7 @@ // If the entity is a template parameter object for a template parameter of // type T, the type of the expression is const T. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct same; template struct same {}; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class9.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class9.C index 737f712..d62be58 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class9.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class9.C @@ -1,5 +1,5 @@ // PR c++/88216 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct same; template struct same {}; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init1.C b/gcc/testsuite/g++.dg/cpp2a/paren-init1.C index a54b2cc..316c162 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init1.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init1.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } struct A { int i; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init10.C b/gcc/testsuite/g++.dg/cpp2a/paren-init10.C index 5c70d9d..8e635de 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init10.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init10.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test from [dcl.init]. diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init11.C b/gcc/testsuite/g++.dg/cpp2a/paren-init11.C index 82ca266..638e9c2e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init11.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init11.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test ill-formed code. diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init12.C b/gcc/testsuite/g++.dg/cpp2a/paren-init12.C index d7be6f2..c53b4b5 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init12.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init12.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init13.C b/gcc/testsuite/g++.dg/cpp2a/paren-init13.C index 4b9107c..31c7d4e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init13.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init13.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct X { int a, b; }; struct Y { X x; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init15.C b/gcc/testsuite/g++.dg/cpp2a/paren-init15.C index 4311dd4..ddaea8f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init15.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init15.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int i; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init16.C b/gcc/testsuite/g++.dg/cpp2a/paren-init16.C index c8ed924..dd991ae 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init16.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init16.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { int a[2]; }; struct A { S s[1]; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init18.C b/gcc/testsuite/g++.dg/cpp2a/paren-init18.C index 0aea493..40a65a5 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init18.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init18.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int a, b, c; }; struct S { A a; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init19.C b/gcc/testsuite/g++.dg/cpp2a/paren-init19.C index 73643fa..065e16a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init19.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init19.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int i[2]; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init2.C b/gcc/testsuite/g++.dg/cpp2a/paren-init2.C index e9e90d7..f1221b2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init2.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init2.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } struct A { int i = 0; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init20.C b/gcc/testsuite/g++.dg/cpp2a/paren-init20.C index 05da760..4dcc94d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init20.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init20.C @@ -1,5 +1,5 @@ // PR c++/92878 - Parenthesized init of aggregates in new-expression. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test new TYPE(...). int f (); diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init21.C b/gcc/testsuite/g++.dg/cpp2a/paren-init21.C index cfd3719..f8e6c4b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init21.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init21.C @@ -1,5 +1,5 @@ // PR c++/92947 - Paren init of aggregates in unevaluated context. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int a; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init22.C b/gcc/testsuite/g++.dg/cpp2a/paren-init22.C index 1b2959e..ac7ab9c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init22.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init22.C @@ -1,5 +1,5 @@ // PR c++/94155 - crash in gimplifier with paren init of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { int i, j; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init23.C b/gcc/testsuite/g++.dg/cpp2a/paren-init23.C index 6038f63..b6761dd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init23.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init23.C @@ -1,5 +1,5 @@ // PR c++/93790 - wrong paren-init of aggregates interference. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { int i; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init24.C b/gcc/testsuite/g++.dg/cpp2a/paren-init24.C index 4e97bbc..261bcbf 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init24.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init24.C @@ -1,5 +1,5 @@ // PR c++/94149 - make __is_constructible work with paren-init of aggrs. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init25.C b/gcc/testsuite/g++.dg/cpp2a/paren-init25.C index 53855a9..011ff31 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init25.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init25.C @@ -1,5 +1,5 @@ // PR c++/94149 - make __is_constructible work with paren-init of aggrs. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct nonaggr { nonaggr() {} diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init26.C b/gcc/testsuite/g++.dg/cpp2a/paren-init26.C index 0b98ebf..cf1edb6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init26.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init26.C @@ -1,5 +1,5 @@ // PR c++/94885 - paren-init of aggregates accepts invalid code. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template // { dg-error "could not convert" } void foo(); diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init3.C b/gcc/testsuite/g++.dg/cpp2a/paren-init3.C index f444005..ebfa8db 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init3.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init3.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } class a { int b{}; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init4.C b/gcc/testsuite/g++.dg/cpp2a/paren-init4.C index f8c7bd1..0bfddf0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init4.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init4.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } // Test T[](). diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init5.C b/gcc/testsuite/g++.dg/cpp2a/paren-init5.C index a64cb00..6d2efd7 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init5.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init5.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } union U { int a; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init6.C b/gcc/testsuite/g++.dg/cpp2a/paren-init6.C index b5d97dc..96a3284 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init6.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init6.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test that we don't perform lifetime extension for () init. diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init7.C b/gcc/testsuite/g++.dg/cpp2a/paren-init7.C index 32af1a7..81f909e9 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init7.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init7.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } int h; struct i { diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init8.C b/gcc/testsuite/g++.dg/cpp2a/paren-init8.C index 30e7165..6433c17 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init8.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init8.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test that we don't accept designated inits in ( ). diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init9.C b/gcc/testsuite/g++.dg/cpp2a/paren-init9.C index c44b206..7058d27 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init9.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init9.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct B { }; struct A : B { diff --git a/gcc/testsuite/g++.dg/cpp2a/pr88534.C b/gcc/testsuite/g++.dg/cpp2a/pr88534.C index 54faf38..2da3814 100644 --- a/gcc/testsuite/g++.dg/cpp2a/pr88534.C +++ b/gcc/testsuite/g++.dg/cpp2a/pr88534.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-g" } typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/g++.dg/cpp2a/pr88537.C b/gcc/testsuite/g++.dg/cpp2a/pr88537.C index d558d45..8d59643 100644 --- a/gcc/testsuite/g++.dg/cpp2a/pr88537.C +++ b/gcc/testsuite/g++.dg/cpp2a/pr88537.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-g" } struct pair { diff --git a/gcc/testsuite/g++.dg/cpp2a/pr89913.C b/gcc/testsuite/g++.dg/cpp2a/pr89913.C index c06847e..8ef9b1e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/pr89913.C +++ b/gcc/testsuite/g++.dg/cpp2a/pr89913.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template using A = auto; // { dg-error "not allowed" } // In pre-20, the error is "invalid use of auto" diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr1.C index 9d008f1..6ccc7e8 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr2.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr2.C index 02f92b1..2610864 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr2.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr2.C @@ -1,5 +1,5 @@ // PR c++/93650 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { using type = enum _Ord { less }; diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-decltype1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-decltype1.C index bc673b2..217e34fe 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-decltype1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-decltype1.C @@ -1,5 +1,5 @@ // PR c++/92560 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq1.C index 19a03fb..88e2d36 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq1.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } struct D { diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq1a.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq1a.C index 7e98c47..1e26e57 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq1a.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq1a.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } template struct D diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq2.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq2.C index 06b988f..8de75bd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq2.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct D { diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq3.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq3.C index 490726d..d31faef 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq3.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { bool operator==(const A&) const; diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq4.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq4.C index d89fc88..66b228d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq4.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int operator==(const A&) const = default; // { dg-error "return .bool" } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq5.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq5.C index ac24f36..429d31a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq5.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq5.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int &r; // { dg-message "reference" } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq6.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq6.C index f804e13..265d075 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq6.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq7.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq7.C index 8112eaa..b135188 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq7.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq7.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } union A { diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq8.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq8.C index aabbd32..61bcde5 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq8.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq8.C @@ -1,5 +1,5 @@ // PR c++/92966 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { int operator==(const S&) const = default; // { dg-error "must return 'bool'" } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq9.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq9.C index 4f5df22..5533481 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq9.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq9.C @@ -1,5 +1,5 @@ // PR c++/94462 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct strong_ordering { }; diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-err1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-err1.C index ce7b56c..905b600 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-err1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-err1.C @@ -1,5 +1,5 @@ // Test that we suggest adding #include . -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } auto x = 1<=>2; // { dg-error "" } // { dg-message "" "" { target *-*-* } .-1 } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-err2.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-err2.C index 6461c6a..56ab343 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-err2.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-err2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include template T())> // { dg-error "31:0 <=> 0" } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-err3.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-err3.C index e756ebc..825bd70 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-err3.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-err3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-err4.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-err4.C index 00f90ce..b044914 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-err4.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-err4.C @@ -1,5 +1,5 @@ // PR c++/94478 - ICE with defaulted comparison operator. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct B {}; bool operator!=(const B&, const B&) = default; // { dg-error "equality comparison operator can only be defaulted in a class definition" } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite1.C index bb60302..c4030cd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite1.C @@ -1,5 +1,5 @@ // This should continue to work. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite3.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite3.C index ef29cff..d0e4a89 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite3.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite3.C @@ -1,10 +1,10 @@ // Test that very different operators still cause ambiguity with reversed. struct X { operator int(); }; -bool operator==(X, int); // #1 { dg-message "reversed" "" { target c++2a } } +bool operator==(X, int); // #1 { dg-message "reversed" "" { target c++20 } } struct Y { operator int(); }; -bool operator==(Y, int); // #2 { dg-message "reversed" "" { target c++2a } } +bool operator==(Y, int); // #2 { dg-message "reversed" "" { target c++20 } } X x; Y y; -bool b1 = x == y; // { dg-error "ambiguous" "" { target c++2a } } -bool b2 = y == x; // { dg-error "ambiguous" "" { target c++2a } } +bool b1 = x == y; // { dg-error "ambiguous" "" { target c++20 } } +bool b2 = y == x; // { dg-error "ambiguous" "" { target c++20 } } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite4.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite4.C index c068b5a..f3488ea 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite4.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite4.C @@ -8,5 +8,5 @@ struct const_iterator { struct iterator { bool operator==(const const_iterator &ci) const { return ci == *this; // { dg-error "deleted" "" { target c++17_down } } - } // { dg-warning "reversed" "" { target c++2a } .-1 } + } // { dg-warning "reversed" "" { target c++20 } .-1 } }; diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1-neg.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1-neg.C index 182bf2b..6e08acf 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1-neg.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1-neg.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1.C index 0d1dd63..c4971aa 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1a.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1a.C index 552c92a..3607c81 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1a.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1a.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar2.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar2.C index d3cb0a6..9d96944 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar2.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar3.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar3.C index 7dacaf4..e6baaa2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar3.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-fext-numeric-literals" } int main() diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-sfinae1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-sfinae1.C index 6a03f54..eb19918 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-sfinae1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-sfinae1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // missing #include template T()) == 0> diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg1.C index f9b2dc4..6c35f70 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg2.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg2.C index ecc249a..486db6c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg2.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg2.C @@ -1,5 +1,5 @@ // PR c++/92774 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg3.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg3.C index 45ce4ee..a4d8b32 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg3.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg3.C @@ -1,5 +1,5 @@ // PR c++/92496 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct A {}; diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth1.C index 2a35de9..1872fb5 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth1.C @@ -1,5 +1,5 @@ // Test with all operators explicitly defaulted. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth1a.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth1a.C index 3231457..899a83c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth1a.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth1a.C @@ -1,5 +1,5 @@ // Test with all operators explicitly defaulted. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2.C index cf23c97..e6401d2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2.C @@ -1,5 +1,5 @@ // Test with only spaceship defaulted. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2a.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2a.C index 11fe32f..959e376 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2a.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2a.C @@ -1,5 +1,5 @@ // Test with only spaceship defaulted. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2b.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2b.C index 2632f52..65915ce 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2b.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2b.C @@ -1,5 +1,5 @@ // Test with only spaceship defaulted. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth3.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth3.C index 0fc5aa2..aac0013 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth3.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth3.C @@ -1,5 +1,5 @@ // Test for reversed candidates. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth3a.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth3a.C index 89f8489..20da546 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth3a.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth3a.C @@ -1,5 +1,5 @@ // Test for reversed candidates. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth4.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth4.C index 0335781..291f6e8 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth4.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth4.C @@ -1,5 +1,5 @@ // Test with all operators explicitly defaulted. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth5.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth5.C index 8e4aa86..49f88f6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth5.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth5.C @@ -1,5 +1,5 @@ // Test with all operators explicitly defaulted. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth6.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth6.C index e8296bb..4765601 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth6.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth6.C @@ -1,5 +1,5 @@ // PR c++/94583 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct strong_ordering { }; } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth7.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth7.C index 86b661c..7cb2014 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth7.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth7.C @@ -1,5 +1,5 @@ // PR c++/94583 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct strong_ordering { }; } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth8.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth8.C index d0d68c7..bd1c4d2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth8.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth8.C @@ -1,5 +1,5 @@ // PR c++/94907 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct strong_ordering { }; } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-vec1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-vec1.C index 8354769..bc1ec63 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-vec1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-vec1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-weak1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-weak1.C index 1ff3954..400d993 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-weak1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-weak1.C @@ -1,5 +1,5 @@ // Test explicit weak_ordering. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include struct A diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc1.C b/gcc/testsuite/g++.dg/cpp2a/srcloc1.C index c88bc14..6e19ff7 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc1.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc10.C b/gcc/testsuite/g++.dg/cpp2a/srcloc10.C index a27016d..1be78d9 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc10.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc10.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc11.C b/gcc/testsuite/g++.dg/cpp2a/srcloc11.C index 742a892..abc850f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc11.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc11.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc12.C b/gcc/testsuite/g++.dg/cpp2a/srcloc12.C index 900e5a8..49a7e56 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc12.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc12.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc13.C b/gcc/testsuite/g++.dg/cpp2a/srcloc13.C index 8909312..ee7b124 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc13.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc13.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc14.C b/gcc/testsuite/g++.dg/cpp2a/srcloc14.C index 21ab831..2730143 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc14.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc14.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc2.C b/gcc/testsuite/g++.dg/cpp2a/srcloc2.C index 380d834..5ef09bb 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc2.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { inline namespace _8 { } diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc3.C b/gcc/testsuite/g++.dg/cpp2a/srcloc3.C index b841ff6..29587e4 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc3.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } auto x = __builtin_source_location (); // { dg-error "'source_location' is not a member of 'std'" } // { dg-message "std::source_location' is defined in header ''; did you forget to '#include '" "" { target *-*-* } .-1 } diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc4.C b/gcc/testsuite/g++.dg/cpp2a/srcloc4.C index c8c5f51..c10f64b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc4.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { void source_location (); diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc5.C b/gcc/testsuite/g++.dg/cpp2a/srcloc5.C index 0e89a00..ce7170b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc5.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc5.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { typedef int source_location; diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc6.C b/gcc/testsuite/g++.dg/cpp2a/srcloc6.C index a389add..89c6887 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc6.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc7.C b/gcc/testsuite/g++.dg/cpp2a/srcloc7.C index 2a8b569..ef56edf 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc7.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc7.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc8.C b/gcc/testsuite/g++.dg/cpp2a/srcloc8.C index db56bb5..caef812 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc8.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc8.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc9.C b/gcc/testsuite/g++.dg/cpp2a/srcloc9.C index 01ba00a..47fce00 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc9.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc9.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/typename1.C b/gcc/testsuite/g++.dg/cpp2a/typename1.C index 0c1f630..726c9df 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename1.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename1.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // OK, return type of a function declaration at global scope. template T::R f(); diff --git a/gcc/testsuite/g++.dg/cpp2a/typename10.C b/gcc/testsuite/g++.dg/cpp2a/typename10.C index 1413268..cdd1465 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename10.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename10.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace N { // template extern T::type v; // #1a diff --git a/gcc/testsuite/g++.dg/cpp2a/typename11.C b/gcc/testsuite/g++.dg/cpp2a/typename11.C index ed7ad95..5dd81f1 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename11.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename11.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct A diff --git a/gcc/testsuite/g++.dg/cpp2a/typename12.C b/gcc/testsuite/g++.dg/cpp2a/typename12.C index 97962e5..99a2359 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename12.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename12.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct W { template diff --git a/gcc/testsuite/g++.dg/cpp2a/typename13.C b/gcc/testsuite/g++.dg/cpp2a/typename13.C index c439f72..5aa5a51 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename13.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename13.C @@ -1,5 +1,5 @@ // P0634R3, PR c++/88358 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template int pi(T::your_pi); diff --git a/gcc/testsuite/g++.dg/cpp2a/typename14.C b/gcc/testsuite/g++.dg/cpp2a/typename14.C index 4750db3..8d82b6b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename14.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename14.C @@ -1,5 +1,5 @@ // PR c++/88325 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/typename15.C b/gcc/testsuite/g++.dg/cpp2a/typename15.C index 9094190..7247671 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename15.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename15.C @@ -1,5 +1,5 @@ // PR c++/88979 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct B { diff --git a/gcc/testsuite/g++.dg/cpp2a/typename16.C b/gcc/testsuite/g++.dg/cpp2a/typename16.C index 7f4242a..bb6d528 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename16.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename16.C @@ -1,5 +1,5 @@ // PR c++/90572 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct X { X(int); }; diff --git a/gcc/testsuite/g++.dg/cpp2a/typename17.C b/gcc/testsuite/g++.dg/cpp2a/typename17.C index bf534f1..5f8be8f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename17.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename17.C @@ -1,5 +1,5 @@ // DR 2413 - typename in conversion-function-ids. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct S { operator T::X(); diff --git a/gcc/testsuite/g++.dg/cpp2a/typename2.C b/gcc/testsuite/g++.dg/cpp2a/typename2.C index 7c92617..4a2a1cd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename2.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename2.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template typename T::R f(); diff --git a/gcc/testsuite/g++.dg/cpp2a/typename3.C b/gcc/testsuite/g++.dg/cpp2a/typename3.C index e64aa03..55ad378 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename3.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename3.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template void f(int i) diff --git a/gcc/testsuite/g++.dg/cpp2a/typename4.C b/gcc/testsuite/g++.dg/cpp2a/typename4.C index 69154e7..fc65eee 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename4.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename4.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/typename5.C b/gcc/testsuite/g++.dg/cpp2a/typename5.C index 97c27ad..6913d08 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename5.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename5.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct X { template diff --git a/gcc/testsuite/g++.dg/cpp2a/typename6.C b/gcc/testsuite/g++.dg/cpp2a/typename6.C index e96e2ab..8b5a453 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename6.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename6.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // (5.2.1) simple-declaration or a function-definition in namespace scope diff --git a/gcc/testsuite/g++.dg/cpp2a/typename7.C b/gcc/testsuite/g++.dg/cpp2a/typename7.C index 713db51..2354faf 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename7.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename7.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Not in namespace scope. template diff --git a/gcc/testsuite/g++.dg/cpp2a/typename8.C b/gcc/testsuite/g++.dg/cpp2a/typename8.C index 3ebfde4..afba0f8 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename8.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename8.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/typename9.C b/gcc/testsuite/g++.dg/cpp2a/typename9.C index 7b18652..70f9e39 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename9.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename9.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-fconcepts" } template class A { class B; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/ucn2.C b/gcc/testsuite/g++.dg/cpp2a/ucn2.C index 2e6ce11..ee7011b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/ucn2.C +++ b/gcc/testsuite/g++.dg/cpp2a/ucn2.C @@ -6,11 +6,11 @@ const char16_t *a = u"\U0001F914\u2753"; const char32_t *b = U"\U0001F914\u2753"; const char16_t *c = u"\uD802"; // { dg-error "is not a valid universal character" } const char16_t *d = u"\U0000DFF0"; // { dg-error "is not a valid universal character" } -const char16_t *e = u"\U00110000"; // { dg-error "is outside the UCS codespace" "" { target c++2a } } +const char16_t *e = u"\U00110000"; // { dg-error "is outside the UCS codespace" "" { target c++20 } } // { dg-error "converting UCN to execution character set" "" { target *-*-* } .-1 } const char32_t *f = U"\uD802"; // { dg-error "is not a valid universal character" } const char32_t *g = U"\U0000DFF0"; // { dg-error "is not a valid universal character" } -const char32_t *h = U"\U00110001"; // { dg-error "is outside the UCS codespace" "" { target c++2a } } +const char32_t *h = U"\U00110001"; // { dg-error "is outside the UCS codespace" "" { target c++20 } } #if __cpp_unicode_characters >= 201411 const char8_t i = u8'\u00C0'; // { dg-error "character constant too long for its type" "" { target c++17 } } #endif @@ -22,9 +22,9 @@ const char8_t l = u8'ab'; // { dg-error "character constant too long for its ty const char16_t m = u'ab'; // { dg-error "character constant too long for its type" } const char32_t n = U'ab'; // { dg-error "character constant too long for its type" } #if __cpp_unicode_characters >= 201411 -const char8_t o = u8'\U00110002'; // { dg-error "is outside the UCS codespace" "" { target c++2a } } +const char8_t o = u8'\U00110002'; // { dg-error "is outside the UCS codespace" "" { target c++20 } } // { dg-error "character constant too long for its type" "" { target c++17 } .-1 } #endif -const char16_t p = u'\U00110003'; // { dg-error "is outside the UCS codespace" "" { target c++2a } } +const char16_t p = u'\U00110003'; // { dg-error "is outside the UCS codespace" "" { target c++20 } } // { dg-error "converting UCN to execution character set" "" { target *-*-* } .-1 } -const char32_t q = U'\U00110004'; // { dg-error "is outside the UCS codespace" "" { target c++2a } } +const char32_t q = U'\U00110004'; // { dg-error "is outside the UCS codespace" "" { target c++20 } } diff --git a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad-neg.C b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad-neg.C index 437fa9b..b91e01c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad-neg.C +++ b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad-neg.C @@ -1,7 +1,7 @@ // PR c++/88095 // Test class non-type template parameters for literal operator templates. // Validate handling of failed class template argument deduction. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { using size_t = decltype(sizeof(int)); diff --git a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad-neg2.C b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad-neg2.C index 89bb5d3..067fdba 100644 --- a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad-neg2.C +++ b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad-neg2.C @@ -1,7 +1,7 @@ // PR c++/88095 // Test class non-type template parameters for literal operator templates. // Validate rejection of class template parameter packs. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { using size_t = decltype(sizeof(int)); diff --git a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad.C b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad.C index f6877a9..e9421bc 100644 --- a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad.C +++ b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad.C @@ -1,7 +1,7 @@ // PR c++/88095 // Test class non-type template parameters for literal operator templates. // Validate support for class template argument deduction. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { using size_t = decltype(sizeof(int)); diff --git a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg.C b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg.C index 8f7e3f2..85b3fe7 100644 --- a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg.C +++ b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg.C @@ -1,7 +1,7 @@ // PR c++/88095 // Test class non-type template parameters for literal operator templates. // Validate that parameter packs are rejected. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct literal_class { constexpr literal_class(...) { } diff --git a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg2.C b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg2.C index 71ba8f9..62cb86a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg2.C +++ b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg2.C @@ -1,7 +1,7 @@ // PR c++/88095 // Test class non-type template parameters for literal operator templates. // Validate that non-literal class types are rejected. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct non_literal_class { constexpr non_literal_class(...) { } diff --git a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp.C b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp.C index dcaca3e..b7ef79d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp.C +++ b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp.C @@ -1,7 +1,7 @@ // PR c++/88095 // Test class non-type template parameters for literal operator templates. // Validate basic support. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct literal_class { constexpr literal_class(...) { } diff --git a/gcc/testsuite/g++.dg/cpp2a/volatile1.C b/gcc/testsuite/g++.dg/cpp2a/volatile1.C index e47591b..7ea6b47 100644 --- a/gcc/testsuite/g++.dg/cpp2a/volatile1.C +++ b/gcc/testsuite/g++.dg/cpp2a/volatile1.C @@ -24,21 +24,21 @@ struct W { W& operator=(volatile W&) volatile; }; -volatile int // { dg-warning ".volatile.-qualified return type is deprecated" "" { target c++2a } } -fn (volatile int i) // { dg-warning ".volatile.-qualified parameter is deprecated" "" { target c++2a } } +volatile int // { dg-warning ".volatile.-qualified return type is deprecated" "" { target c++20 } } +fn (volatile int i) // { dg-warning ".volatile.-qualified parameter is deprecated" "" { target c++20 } } { volatile int v = 10; int *volatile p = nullptr; // Pre/post ++/--. - v++; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++2a } } - ++v; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++2a } } - v--; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++2a } } - --v; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++2a } } - p++; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++2a } } - ++p; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++2a } } - p--; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++2a } } - --p; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++2a } } + v++; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++20 } } + ++v; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++20 } } + v--; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++20 } } + --v; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++20 } } + p++; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++20 } } + ++p; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++20 } } + p--; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++20 } } + --p; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++20 } } return v + i + *p; } @@ -55,45 +55,45 @@ fn2 () vi = 42; vi = i; vi = i = 42; - i = vi = 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - &(vi = i); // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + i = vi = 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + &(vi = i); // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } (vi = 42, 45); - (i = vi = 42, 10); // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + (i = vi = 42, 10); // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } i = vi; // LHS not volatile. i = (vi = i, 42); static_cast(vi = i); - static_cast(i = vi = 42); // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + static_cast(i = vi = 42); // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } (void)(vi = i); - (void)(i = vi = 42); // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + (void)(i = vi = 42); // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } // Unevaluated operand. decltype(vi = 42) x = vi; decltype(i = vi = 42) x3 = i; // Compound assignments. - vi += i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - vi -= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - vi %= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - vi ^= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - vi |= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - vi /= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - vi = vi += 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - vi += vi = 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + vi += i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + vi -= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + vi %= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + vi ^= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + vi |= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + vi /= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + vi = vi += 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + vi += vi = 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } i *= vi; - decltype(vi -= 42) x2 = vi; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + decltype(vi -= 42) x2 = vi; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } // Structured bindings. int a[] = { 10, 5 }; const auto & [cxr, cyr] = a; - const volatile auto & [cvxr, cvyr] = a; // { dg-warning ".volatile.-qualified structured binding is deprecated" "" { target c++2a } } - volatile auto & [vxr, vyr] = a; // { dg-warning ".volatile.-qualified structured binding is deprecated" "" { target c++2a } } + const volatile auto & [cvxr, cvyr] = a; // { dg-warning ".volatile.-qualified structured binding is deprecated" "" { target c++20 } } + volatile auto & [vxr, vyr] = a; // { dg-warning ".volatile.-qualified structured binding is deprecated" "" { target c++20 } } } void fn3 () { volatile int i, j, k = 0; - i = j = k; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + i = j = k; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } ACCESS_ONCE(j); @@ -102,13 +102,13 @@ fn3 () volatile U u; u.c = 42; - i = u.c = 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - u.c += 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + i = u.c = 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + u.c += 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } volatile T t; t.a = 3; - j = t.a = 3; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - t.a += 3; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + j = t.a = 3; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + t.a += 3; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } volatile int *src = &i; *src; // No assignment, don't warn. @@ -130,8 +130,8 @@ void raccoon () { volatile T t, u; t = 42; - u = t = 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - t &= 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + u = t = 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + t &= 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } } void diff --git a/gcc/testsuite/g++.dg/cpp2a/volatile2.C b/gcc/testsuite/g++.dg/cpp2a/volatile2.C index 1a7889a..92526b5 100644 --- a/gcc/testsuite/g++.dg/cpp2a/volatile2.C +++ b/gcc/testsuite/g++.dg/cpp2a/volatile2.C @@ -1,5 +1,5 @@ // PR c++/91361 - P1152R4: Deprecating some uses of volatile. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-Wno-volatile" } #define ACCESS_ONCE(x) (*(volatile __typeof(x) *)&(x)) diff --git a/gcc/testsuite/g++.dg/cpp2a/volatile4.C b/gcc/testsuite/g++.dg/cpp2a/volatile4.C index 2148cde..e22ee6c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/volatile4.C +++ b/gcc/testsuite/g++.dg/cpp2a/volatile4.C @@ -1,5 +1,5 @@ // PR c++/91361 - P1152R4: Deprecating some uses of volatile. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-Wno-deprecated" } #define ACCESS_ONCE(x) (*(volatile __typeof(x) *)&(x)) diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 7c41c4e..f425bac 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,8 @@ +2020-05-13 Jason Merrill + + * include/cpplib.h (enum c_lang): Change CXX2A to CXX20. + * init.c, lex.c: Adjust. + 2020-05-12 Nathan Sidwell EOF location is at end of file diff --git a/libcpp/charset.c b/libcpp/charset.c index d9281c5..db47235 100644 --- a/libcpp/charset.c +++ b/libcpp/charset.c @@ -1021,7 +1021,7 @@ ucn_valid_in_identifier (cpp_reader *pfile, cppchar_t c, If the hexadecimal value is larger than the upper bound of the UCS codespace specified in ISO/IEC 10646, a pedantic warning is issued - in all versions of C and in the C++2a or later versions of C++. + in all versions of C and in the C++20 or later versions of C++. *PSTR must be preceded by "\u" or "\U"; it is assumed that the buffer end is delimited by a non-hex digit. Returns false if the diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index 2b1e33f..7f47402 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -173,7 +173,7 @@ enum c_lang {CLK_GNUC89 = 0, CLK_GNUC99, CLK_GNUC11, CLK_GNUC17, CLK_GNUC2X, CLK_STDC2X, CLK_GNUCXX, CLK_CXX98, CLK_GNUCXX11, CLK_CXX11, CLK_GNUCXX14, CLK_CXX14, CLK_GNUCXX17, CLK_CXX17, - CLK_GNUCXX2A, CLK_CXX2A, CLK_ASM}; + CLK_GNUCXX20, CLK_CXX20, CLK_ASM}; /* Payload of a NUMBER, STRING, CHAR or COMMENT token. */ struct GTY(()) cpp_string { @@ -484,7 +484,7 @@ struct cpp_options /* Nonzero for C2X decimal floating-point constants. */ unsigned char dfp_constants; - /* Nonzero for C++2a __VA_OPT__ feature. */ + /* Nonzero for C++20 __VA_OPT__ feature. */ unsigned char va_opt; /* Nonzero for the '::' token. */ diff --git a/libcpp/init.c b/libcpp/init.c index a3cd8e2..1f8996a 100644 --- a/libcpp/init.c +++ b/libcpp/init.c @@ -117,8 +117,8 @@ static const struct lang_flags lang_defaults[] = /* CXX14 */ { 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0 }, /* GNUCXX17 */ { 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0 }, /* CXX17 */ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0 }, - /* GNUCXX2A */ { 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0 }, - /* CXX2A */ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0 }, + /* GNUCXX20 */ { 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0 }, + /* CXX20 */ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0 }, /* ASM */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; @@ -533,8 +533,8 @@ cpp_init_builtins (cpp_reader *pfile, int hosted) if (CPP_OPTION (pfile, cplusplus)) { - if (CPP_OPTION (pfile, lang) == CLK_CXX2A - || CPP_OPTION (pfile, lang) == CLK_GNUCXX2A) + if (CPP_OPTION (pfile, lang) == CLK_CXX20 + || CPP_OPTION (pfile, lang) == CLK_GNUCXX20) _cpp_define_builtin (pfile, "__cplusplus 201709L"); else if (CPP_OPTION (pfile, lang) == CLK_CXX17 || CPP_OPTION (pfile, lang) == CLK_GNUCXX17) diff --git a/libcpp/lex.c b/libcpp/lex.c index 043852d..f0ee0f9 100644 --- a/libcpp/lex.c +++ b/libcpp/lex.c @@ -1372,7 +1372,7 @@ maybe_va_opt_error (cpp_reader *pfile) system headers. */ if (!cpp_in_system_header (pfile)) cpp_error (pfile, CPP_DL_PEDWARN, - "__VA_OPT__ is not available until C++2a"); + "__VA_OPT__ is not available until C++20"); } else if (!pfile->state.va_args_ok) { @@ -1380,7 +1380,7 @@ maybe_va_opt_error (cpp_reader *pfile) variadic macro. */ cpp_error (pfile, CPP_DL_PEDWARN, "__VA_OPT__ can only appear in the expansion" - " of a C++2a variadic macro"); + " of a C++20 variadic macro"); } } @@ -2994,7 +2994,7 @@ _cpp_lex_direct (cpp_reader *pfile) buffer->cur++, result->type = CPP_LESS_EQ; if (*buffer->cur == '>' && CPP_OPTION (pfile, cplusplus) - && CPP_OPTION (pfile, lang) >= CLK_GNUCXX2A) + && CPP_OPTION (pfile, lang) >= CLK_GNUCXX20) buffer->cur++, result->type = CPP_SPACESHIP; } else if (*buffer->cur == '<') diff --git a/libcpp/macro.c b/libcpp/macro.c index 2573f31..dc4366f 100644 --- a/libcpp/macro.c +++ b/libcpp/macro.c @@ -1035,7 +1035,7 @@ _cpp_arguments_ok (cpp_reader *pfile, cpp_macro *macro, const cpp_hashnode *node if (argc < macro->paramc) { - /* In C++2a (here the va_opt flag is used), and also as a GNU + /* In C++20 (here the va_opt flag is used), and also as a GNU extension, variadic arguments are allowed to not appear in the invocation at all. e.g. #define debug(format, args...) something