From 7b9361409dda228eedb13a3abe547c3cafbe957b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 15 Sep 2017 18:15:46 +0200 Subject: [PATCH] invoke.texi: Document -std=c++17 and -std=gnu++17 and document c++1z and gnu++1z as deprecated. * doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document c++1z and gnu++1z as deprecated. Change other references to -std=c++1z to -std=c++17 and -std=gnu++1z to -std=gnu++17. Change -Wc++1z-compat to -Wc++17-compat. * doc/cpp.texi: Document -std=c++17 defines __cplusplus 201703L. * dwarf2out.c (highest_c_language): Handle C++17. (gen_compile_unit_die): Likewise. c-family/ * c.opt (Wc++1z-compat): Change from option to undocumented alias. (Wc++17-compat): Change from undocumented alias to option. (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat, change C++1z to C++17 in description. (std=c++1z, std=gnu++1z): Change from option to undocumented deprecated alias. (std=c++17, std=gnu++17): Change from undocumented alias to option. Adjust description. * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17. * c-opts.c (set_std_cxx1z): Rename to ... (set_std_cxx17): ... this. (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z caller. (c_common_post_options): Use cxx17 instead of cxx1z. Adjust comments. cp/ * decl.c (redeclaration_error_message): Use cxx17 instead of cxx1z, adjust diagnostics refering to C++1z or -std=gnu++1z or -std=c++1z to C++17 or -std=gnu++17 or -std=c++17. Adjust comments. (cxx_init_decl_processing, next_initializable_field, is_direct_enum_init, check_initializer, cp_finish_decl, mark_inline_variable, grokdeclarator, grokparms, xref_basetypes, finish_function): Likewise. * cp-tree.h (DECL_INLINE_VAR_P): Likewise. * pt.c (mark_template_parm, convert_nontype_argument, instantiate_class_template_1, type_unification_real, unify, get_partial_spec_bindings, dependent_type_p_r): Likewise. * typeck.c (cp_build_unary_op): Likewise. * constexpr.c (var_in_maybe_constexpr_fn): Likewise. * call.c (build_user_type_conversion_1, build_over_call, build_special_member_call): Likewise. * lambda.c (begin_lambda_type): Likewise. * typeck2.c (process_init_constructor_record): Likewise. * class.c (build_base_field, finalize_literal_type_property, explain_non_literal_class): Likewise. * parser.c (cp_parser_diagnose_invalid_type_name, cp_parser_primary_expression, cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt, cp_parser_selection_statement, cp_convert_range_for, cp_parser_perform_range_for_lookup, cp_parser_decomposition_declaration, cp_parser_linkage_specification, cp_parser_static_assert, cp_parser_simple_type_specifier, cp_parser_namespace_definition, cp_parser_using_declaration, cp_parser_init_declarator, cp_parser_type_parameter_key, cp_parser_exception_specification_opt, cp_parser_std_attribute_spec, cp_parser_constructor_declarator_p): Likewise. * mangle.c (struct globals): Rename need_cxx1z_warning to need_cxx17_warning. (write_exception_spec, start_mangling, mangle_decl): Likewise. * Make-lang.in (check-c++1z): Rename to check-c++17, depend on it. (check-c++17): New goal. Use 17 instead of 1z. (check-c++-all): Use 17 instead of 1z. testsuite/ * lib/g++-dg.exp (g++-dg-runtest): Use 17 instead of 1z. * lib/target-supports.exp (check_effective_target_c++14): Use check_effective_target_c++17 instead of check_effective_target_c++1z. (check_effective_target_c++14_down): Likewise. (check_effective_target_c++1z_only): Rename to ... (check_effective_target_c++17_only): ... this. (check_effective_target_c++1z): Rename to ... (check_effective_target_c++17): ... this. * g++.dg/debug/dwarf2/inline-var-1.C: Use -std=c++17 or -std=gnu++17 instead of -std=c++1z or -std=gnu++1z. Use c++17 instead of c++1z and c++17_only instead of c++1z_only. Adjust expected diagnostics and comments refering to 1z to 17. * g++.dg/debug/dwarf2/inline-var-2.C: Likewise. * g++.dg/template/partial5.C: Likewise. * g++.dg/template/nontype8.C: Likewise. * g++.dg/cpp1z/noexcept-type5.C: Likewise. * g++.dg/cpp1z/nontype3a.C: Likewise. * g++.dg/cpp1z/constexpr-lambda4.C: Likewise. * g++.dg/cpp1z/noexcept-type16.C: Likewise. * g++.dg/cpp1z/class-deduction32.C: Likewise. * g++.dg/cpp1z/pr78771.C: Likewise. * g++.dg/cpp1z/elide1.C: Likewise. * g++.dg/cpp1z/fold3.C: Likewise. * g++.dg/cpp1z/class-deduction2.C: Likewise. * g++.dg/cpp1z/noexcept-type12.C: Likewise. * g++.dg/cpp1z/inline-var2.C: Likewise. * g++.dg/cpp1z/eval-order2.C: Likewise. * g++.dg/cpp1z/decomp21.C: Likewise. * g++.dg/cpp1z/constexpr-lambda11.C: Likewise. * g++.dg/cpp1z/constexpr-lambda9.C: Likewise. * g++.dg/cpp1z/utf8-neg.C: Likewise. * g++.dg/cpp1z/class-deduction41.C: Likewise. * g++.dg/cpp1z/class-deduction23.C: Likewise. * g++.dg/cpp1z/nodiscard3.C: Likewise. * g++.dg/cpp1z/static_assert-nomsg.C: Likewise. * g++.dg/cpp1z/noexcept-type9.C: Likewise. * g++.dg/cpp1z/class-deduction21.C: Likewise. * g++.dg/cpp1z/range-for1.C: Likewise. * g++.dg/cpp1z/init-statement4.C: Likewise. * g++.dg/cpp1z/udlit-utf8char.C: Likewise. * g++.dg/cpp1z/decomp30.C: Likewise. * g++.dg/cpp1z/class-deduction39.C: Likewise. * g++.dg/cpp1z/register2.C: Likewise. * g++.dg/cpp1z/decomp9.C: Likewise. * g++.dg/cpp1z/regress1.C: Likewise. * g++.dg/cpp1z/direct-enum-init1.C: Likewise. * g++.dg/cpp1z/class-deduction30.C: Likewise. * g++.dg/cpp1z/abbrev2.C: Likewise. * g++.dg/cpp1z/nontype-auto6.C: Likewise. * g++.dg/cpp1z/regress2.C: Likewise. * g++.dg/cpp1z/decomp16.C: Likewise. * g++.dg/cpp1z/bool-increment1.C: Likewise. * g++.dg/cpp1z/aligned-new1.C: Likewise. * g++.dg/cpp1z/decomp3.C: Likewise. * g++.dg/cpp1z/register1.C: Likewise. * g++.dg/cpp1z/namespace-attribs.C: Likewise. * g++.dg/cpp1z/class-deduction1.C: Likewise. * g++.dg/cpp1z/decomp10.C: Likewise. * g++.dg/cpp1z/constexpr-if11.C: Likewise. * g++.dg/cpp1z/constexpr-lambda10.C: Likewise. * g++.dg/cpp1z/decomp27.C: Likewise. * g++.dg/cpp1z/noexcept-type2.C: Likewise. * g++.dg/cpp1z/constexpr-lambda6.C: Likewise. * g++.dg/cpp1z/class-deduction9.C: Likewise. * g++.dg/cpp1z/attributes-enum-1.C: Likewise. * g++.dg/cpp1z/decomp11.C: Likewise. * g++.dg/cpp1z/aligned-new3.C: Likewise. * g++.dg/cpp1z/utf8-2.C: Likewise. * g++.dg/cpp1z/lambda-this3.C: Likewise. * g++.dg/cpp1z/decomp-constexpr1.C: Likewise. * g++.dg/cpp1z/byte1.C: Likewise. * g++.dg/cpp1z/nontype-auto9.C: Likewise. * g++.dg/cpp1z/aggr-base4.C: Likewise. * g++.dg/cpp1z/constexpr-lambda1.C: Likewise. * g++.dg/cpp1z/nontype-auto3.C: Likewise. * g++.dg/cpp1z/utf8-2a.C: Likewise. * g++.dg/cpp1z/constexpr-lambda7.C: Likewise. * g++.dg/cpp1z/aggr-base6.C: Likewise. * g++.dg/cpp1z/cplusplus.C: Likewise. * g++.dg/cpp1z/class-deduction20.C: Likewise. * g++.dg/cpp1z/aggr-base2.C: Likewise. * g++.dg/cpp1z/class-deduction6.C: Likewise. * g++.dg/cpp1z/noexcept-type3.C: Likewise. * g++.dg/cpp1z/class-deduction31.C: Likewise. * g++.dg/cpp1z/class-deduction25.C: Likewise. * g++.dg/cpp1z/class-deduction18.C: Likewise. * g++.dg/cpp1z/fold9.C: Likewise. * g++.dg/cpp1z/noexcept-type8.C: Likewise. * g++.dg/cpp1z/abbrev1.C: Likewise. * g++.dg/cpp1z/constexpr-if10.C: Likewise. * g++.dg/cpp1z/utf8.C: Likewise. * g++.dg/cpp1z/noexcept-type7.C: Likewise. * g++.dg/cpp1z/aggr-base3.C: Likewise. * g++.dg/cpp1z/constexpr-lambda8.C: Likewise. * g++.dg/cpp1z/init-statement2.C: Likewise. * g++.dg/cpp1z/nontype-auto4.C: Likewise. * g++.dg/cpp1z/constexpr-if12.C: Likewise. * g++.dg/cpp1z/class-deduction40.C: Likewise. * g++.dg/cpp1z/nontype3.C: Likewise. * g++.dg/cpp1z/class-deduction14.C: Likewise. * g++.dg/cpp1z/fold7.C: Likewise. * g++.dg/cpp1z/nontype2.C: Likewise. * g++.dg/cpp1z/class-deduction15.C: Likewise. * g++.dg/cpp1z/nested-namespace-def1.C: Likewise. * g++.dg/cpp1z/class-deduction13.C: Likewise. * g++.dg/cpp1z/aligned-new7.C: Likewise. * g++.dg/cpp1z/noexcept-type1.C: Likewise. * g++.dg/cpp1z/nontype1.C: Likewise. * g++.dg/cpp1z/init-statement5.C: Likewise. * g++.dg/cpp1z/nontype-auto2.C: Likewise. * g++.dg/cpp1z/decomp17.C: Likewise. * g++.dg/cpp1z/fold4.C: Likewise. * g++.dg/cpp1z/constexpr-lambda2.C: Likewise. * g++.dg/cpp1z/fold7a.C: Likewise. * g++.dg/cpp1z/nontype-auto5.C: Likewise. * g++.dg/cpp1z/init-statement7.C: Likewise. * g++.dg/cpp1z/aggr-base5.C: Likewise. * g++.dg/cpp1z/constexpr-lambda5.C: Likewise. * g++.dg/cpp1z/pr79143.C: Likewise. * g++.dg/cpp1z/class-deduction38.C: Likewise. * g++.dg/cpp1z/nontype-auto8.C: Likewise. * g++.dg/cpp1z/class-deduction12.C: Likewise. * g++.dg/cpp1z/decomp20.C: Likewise. * g++.dg/cpp1z/class-deduction22.C: Likewise. * g++.dg/cpp1z/class-deduction29.C: Likewise. * g++.dg/cpp1z/class-deduction8.C: Likewise. * g++.dg/cpp1z/class-deduction43.C: Likewise. * g++.dg/cpp1z/feat-cxx1z.C: Likewise. * g++.dg/cpp1z/fold8.C: Likewise. * g++.dg/cpp1z/init-statement3.C: Likewise. * g++.dg/cpp1z/nontype-auto10.C: Likewise. * g++.dg/cpp1z/class-deduction36.C: Likewise. * g++.dg/cpp1z/noexcept-type17.C: Likewise. * g++.dg/cpp1z/fallthrough1.C: Likewise. * g++.dg/cpp1z/fold1.C: Likewise. * g++.dg/cpp1z/class-deduction26.C: Likewise. * g++.dg/cpp1z/fold-ice1.C: Likewise. * g++.dg/cpp1z/fold5.C: Likewise. * g++.dg/cpp1z/class-deduction34.C: Likewise. * g++.dg/cpp1z/noexcept-type6.C: Likewise. * g++.dg/cpp1z/class-deduction7.C: Likewise. * g++.dg/cpp1z/class-deduction16.C: Likewise. * g++.dg/cpp1z/class-deduction10.C: Likewise. * g++.dg/cpp1z/eval-order3.C: Likewise. * g++.dg/cpp1z/constexpr-lambda13.C: Likewise. * g++.dg/cpp1z/aggr-base2a.C: Likewise. * g++.dg/cpp1z/nontype-auto1.C: Likewise. * g++.dg/cpp1z/constexpr-lambda3.C: Likewise. * g++.dg/cpp1z/nontype-auto7.C: Likewise. * g++.dg/cpp1z/decomp15.C: Likewise. * g++.dg/cpp1z/noexcept-type4.C: Likewise. * g++.dg/cpp1z/fold-mangle.C: Likewise. * g++.dg/cpp1z/class-deduction35.C: Likewise. * g++.dg/cpp1z/decomp4.C: Likewise. * g++.dg/cpp1z/class-deduction42.C: Likewise. * g++.dg/cpp1z/init-statement8.C: Likewise. * g++.dg/cpp1z/inline-var1a.C: Likewise. * g++.dg/cpp1z/init-statement6.C: Likewise. * g++.dg/cpp1z/class-deduction17.C: Likewise. * g++.dg/cpp1z/class-deduction28.C: Likewise. * g++.dg/cpp1z/class-deduction27.C: Likewise. * g++.dg/cpp1z/decomp-bitfield1.C: Likewise. * g++.dg/cpp1z/attributes-enum-1a.C: Likewise. * g++.dg/cpp1z/class-deduction11.C: Likewise. * g++.dg/cpp1z/constexpr-lambda12.C: Likewise. * g++.dg/cpp1z/init-statement9.C: Likewise. * g++.dg/cpp1z/class-deduction19.C: Likewise. * g++.dg/cpp1z/class-deduction5.C: Likewise. * g++.dg/cpp1z/fold2.C: Likewise. * g++.dg/cpp1z/class-deduction33.C: Likewise. * g++.dg/cpp1z/class-deduction24.C: Likewise. * g++.dg/cpp1z/aggr-base1.C: Likewise. * g++.dg/cpp1z/fold6.C: Likewise. * g++.dg/cpp1z/decomp12.C: Likewise. * g++.dg/cpp1z/class-deduction4.C: Likewise. * g++.dg/cpp1z/inline-var1.C: Likewise. * g++.dg/cpp1z/aligned-new2.C: Likewise. * g++.dg/cpp1z/class-deduction3.C: Likewise. * g++.dg/other/error3.C: Likewise. * g++.dg/init/new25.C: Likewise. * g++.dg/init/new13.C: Likewise. * g++.dg/tls/diag-2.C: Likewise. * g++.dg/tls/diag-4.C: Likewise. * g++.dg/opt/noreturn-1.C: Likewise. * g++.dg/eh/async-unwind2.C: Likewise. * g++.dg/eh/spec9.C: Likewise. * g++.dg/eh/spec7.C: Likewise. * g++.dg/eh/template1.C: Likewise. * g++.dg/eh/cond4.C: Likewise. * g++.dg/eh/pr41819.C: Likewise. * g++.dg/eh/delete1.C: Likewise. * g++.dg/eh/spec3.C: Likewise. * g++.dg/eh/forced4.C: Likewise. * g++.dg/eh/spec2.C: Likewise. * g++.dg/eh/shadow1.C: Likewise. * g++.dg/eh/pr38662.C: Likewise. * g++.dg/eh/ehopt1.C: Likewise. * g++.dg/eh/spec8.C: Likewise. * g++.dg/eh/init-temp2.C: Likewise. * g++.dg/rtti/crash3.C: Likewise. * g++.dg/warn/Wreturn-type-3.C: Likewise. * g++.dg/warn/register-parm-1.C: Likewise. * g++.dg/warn/register-var-2.C: Likewise. * g++.dg/gcov/gcov-7.C: Likewise. * g++.dg/tree-ssa/pr45605.C: Likewise. * g++.dg/cpp/pr23827_cxx98_neg.C: Likewise. * g++.dg/lookup/exception1.C: Likewise. * g++.dg/ubsan/pr79589.C: Likewise. * g++.dg/tm/pr47340.C: Likewise. * g++.dg/tm/pr46567.C: Likewise. * g++.dg/expr/bitfield5.C: Likewise. * g++.dg/expr/bool1.C: Likewise. * g++.dg/expr/lval3.C: Likewise. * g++.dg/expr/lval4.C: Likewise. * g++.dg/expr/bitfield4.C: Likewise. * g++.dg/expr/bitfield6.C: Likewise. * g++.dg/expr/bool3.C: Likewise. * g++.dg/ext/has_nothrow_constructor.C: Likewise. * g++.dg/ext/has_nothrow_copy-7.C: Likewise. * g++.dg/ext/has_nothrow_copy-1.C: Likewise. * g++.dg/ext/has_nothrow_copy-2.C: Likewise. * g++.dg/ext/has_nothrow_copy-4.C: Likewise. * g++.dg/ext/has_nothrow_copy-5.C: Likewise. * g++.dg/ext/has_nothrow_copy-6.C: Likewise. * g++.dg/ext/has_nothrow_assign.C: Likewise. * g++.dg/parse/register1.C: Likewise. * g++.dg/parse/error15.C: Likewise. * g++.dg/parse/linkage2.C: Likewise. * g++.dg/concepts/intro2.C: Likewise. * g++.dg/concepts/class.C: Likewise. * g++.dg/concepts/traits1.C: Likewise. * g++.dg/concepts/req5.C: Likewise. * g++.dg/concepts/var-concept5.C: Likewise. * g++.dg/concepts/fn-concept2.C: Likewise. * g++.dg/concepts/traits2.C: Likewise. * g++.dg/concepts/placeholder2.C: Likewise. * g++.dg/concepts/class6.C: Likewise. * g++.dg/concepts/memtmpl1.C: Likewise. * g++.dg/concepts/friend2.C: Likewise. * g++.dg/concepts/template-parm3.C: Likewise. * g++.dg/concepts/template-parm10.C: Likewise. * g++.dg/concepts/explicit-spec1.C: Likewise. * g++.dg/concepts/explicit-spec3.C: Likewise. * g++.dg/concepts/var-templ2.C: Likewise. * g++.dg/concepts/intro5.C: Likewise. * g++.dg/concepts/deduction-constraint1.C: Likewise. * g++.dg/concepts/iconv1.C: Likewise. * g++.dg/concepts/constrained-parm.C: Likewise. * g++.dg/concepts/template-template-parm1.C: Likewise. * g++.dg/concepts/var-concept3.C: Likewise. * g++.dg/concepts/class3.C: Likewise. * g++.dg/concepts/memfun2.C: Likewise. * g++.dg/concepts/req1.C: Likewise. * g++.dg/concepts/disjunction1.C: Likewise. * g++.dg/concepts/req17.C: Likewise. * g++.dg/concepts/pr65848.C: Likewise. * g++.dg/concepts/placeholder4.C: Likewise. * g++.dg/concepts/decl-diagnose.C: Likewise. * g++.dg/concepts/intro7.C: Likewise. * g++.dg/concepts/pr68683.C: Likewise. * g++.dg/concepts/partial-spec4.C: Likewise. * g++.dg/concepts/template-parm5.C: Likewise. * g++.dg/concepts/explicit-inst1.C: Likewise. * g++.dg/concepts/class-deduction1.C: Likewise. * g++.dg/concepts/class1.C: Likewise. * g++.dg/concepts/req15.C: Likewise. * g++.dg/concepts/memfun.C: Likewise. * g++.dg/concepts/pr68434.C: Likewise. * g++.dg/concepts/inherit-ctor4.C: Likewise. * g++.dg/concepts/partial-spec6.C: Likewise. * g++.dg/concepts/var-templ1.C: Likewise. * g++.dg/concepts/template-parm8.C: Likewise. * g++.dg/concepts/explicit-inst3.C: Likewise. * g++.dg/concepts/class4.C: Likewise. * g++.dg/concepts/req6.C: Likewise. * g++.dg/concepts/fn8.C: Likewise. * g++.dg/concepts/class5.C: Likewise. * g++.dg/concepts/placeholder5.C: Likewise. * g++.dg/concepts/req16.C: Likewise. * g++.dg/concepts/req10.C: Likewise. * g++.dg/concepts/var-concept2.C: Likewise. * g++.dg/concepts/auto3.C: Likewise. * g++.dg/concepts/generic-fn-err.C: Likewise. * g++.dg/concepts/pr65552.C: Likewise. * g++.dg/concepts/partial-concept-id2.C: Likewise. * g++.dg/concepts/fn1.C: Likewise. * g++.dg/concepts/partial-spec.C: Likewise. * g++.dg/concepts/template-parm12.C: Likewise. * g++.dg/concepts/diagnostic1.C: Likewise. * g++.dg/concepts/intro1.C: Likewise. * g++.dg/concepts/explicit-inst4.C: Likewise. * g++.dg/concepts/req18.C: Likewise. * g++.dg/concepts/explicit-spec5.C: Likewise. * g++.dg/concepts/var-concept6.C: Likewise. * g++.dg/concepts/fn9.C: Likewise. * g++.dg/concepts/req2.C: Likewise. * g++.dg/concepts/template-parm7.C: Likewise. * g++.dg/concepts/req14.C: Likewise. * g++.dg/concepts/template-parm6.C: Likewise. * g++.dg/concepts/variadic4.C: Likewise. * g++.dg/concepts/fn6.C: Likewise. * g++.dg/concepts/req-neg1.C: Likewise. * g++.dg/concepts/alias3.C: Likewise. * g++.dg/concepts/expression2.C: Likewise. * g++.dg/concepts/partial-spec3.C: Likewise. * g++.dg/concepts/expression3.C: Likewise. * g++.dg/concepts/memfun-err.C: Likewise. * g++.dg/concepts/pr66091.C: Likewise. * g++.dg/concepts/explicit-spec2.C: Likewise. * g++.dg/concepts/equiv.C: Likewise. * g++.dg/concepts/friend1.C: Likewise. * g++.dg/concepts/fn4.C: Likewise. * g++.dg/concepts/var-templ3.C: Likewise. * g++.dg/concepts/explicit-inst2.C: Likewise. * g++.dg/concepts/alias2.C: Likewise. * g++.dg/concepts/regress/alias-decl-42.C: Likewise. * g++.dg/concepts/placeholder6.C: Likewise. * g++.dg/concepts/fn10.C: Likewise. * g++.dg/concepts/req3.C: Likewise. * g++.dg/concepts/variadic2.C: Likewise. * g++.dg/concepts/pr65636.C: Likewise. * g++.dg/concepts/intro6.C: Likewise. * g++.dg/concepts/class2.C: Likewise. * g++.dg/concepts/fn2.C: Likewise. * g++.dg/concepts/req20.C: Likewise. * g++.dg/concepts/req8.C: Likewise. * g++.dg/concepts/placeholder1.C: Likewise. * g++.dg/concepts/pr65854.C: Likewise. * g++.dg/concepts/member-concept.C: Likewise. * g++.dg/concepts/template-parm2.C: Likewise. * g++.dg/concepts/variadic1.C: Likewise. * g++.dg/concepts/fn7.C: Likewise. * g++.dg/concepts/intro4.C: Likewise. * g++.dg/concepts/req13.C: Likewise. * g++.dg/concepts/inherit-ctor3.C: Likewise. * g++.dg/concepts/explicit-spec6.C: Likewise. * g++.dg/concepts/auto1.C: Likewise. * g++.dg/concepts/alias1.C: Likewise. * g++.dg/concepts/fn-concept1.C: Likewise. * g++.dg/concepts/template-parm11.C: Likewise. * g++.dg/concepts/explicit-spec4.C: Likewise. * g++.dg/concepts/partial-concept-id1.C: Likewise. * g++.dg/concepts/req9.C: Likewise. * g++.dg/concepts/req4.C: Likewise. * g++.dg/concepts/pr65681.C: Likewise. * g++.dg/concepts/req7.C: Likewise. * g++.dg/concepts/req12.C: Likewise. * g++.dg/concepts/fn5.C: Likewise. * g++.dg/concepts/alias4.C: Likewise. * g++.dg/concepts/generic-fn.C: Likewise. * g++.dg/concepts/feature-macro.C: Likewise. * g++.dg/concepts/req19.C: Likewise. * g++.dg/concepts/placeholder3.C: Likewise. * g++.dg/concepts/intro3.C: Likewise. * g++.dg/concepts/partial-spec5.C: Likewise. * g++.dg/concepts/template-parm4.C: Likewise. * g++.dg/concepts/dr1430.C: Likewise. * g++.dg/concepts/pr65634.C: Likewise. * g++.dg/concepts/var-concept4.C: Likewise. * g++.dg/concepts/pr67249.C: Likewise. * g++.dg/concepts/expression.C: Likewise. * g++.dg/concepts/pr65575.C: Likewise. * g++.dg/concepts/partial-spec2.C: Likewise. * g++.dg/concepts/template-parm9.C: Likewise. * g++.dg/concepts/inherit-ctor1.C: Likewise. * g++.dg/concepts/equiv2.C: Likewise. * g++.dg/concepts/req11.C: Likewise. * g++.dg/concepts/template-parm1.C: Likewise. * g++.dg/concepts/inherit-ctor2.C: Likewise. * g++.dg/concepts/var-concept1.C: Likewise. * g++.dg/concepts/fn3.C: Likewise. * g++.dg/torture/pr46364.C: Likewise. * g++.dg/torture/stackalign/eh-alloca-1.C: Likewise. * g++.dg/torture/stackalign/eh-fastcall-1.C: Likewise. * g++.dg/torture/stackalign/eh-vararg-1.C: Likewise. * g++.dg/torture/stackalign/eh-vararg-2.C: Likewise. * g++.dg/torture/stackalign/eh-global-1.C: Likewise. * g++.dg/torture/stackalign/eh-thiscall-1.C: Likewise. * g++.dg/torture/stackalign/eh-inline-2.C: Likewise. * g++.dg/torture/stackalign/eh-inline-1.C: Likewise. * g++.dg/torture/pr52918-1.C: Likewise. * g++.dg/torture/pr49394.C: Likewise. * g++.dg/torture/pr57190.C: Likewise. * g++.dg/cpp0x/static_assert8.C: Likewise. * g++.dg/cpp0x/noexcept19.C: Likewise. * g++.dg/cpp0x/variadic-throw.C: Likewise. * g++.dg/cpp0x/variadic73.C: Likewise. * g++.dg/cpp0x/noexcept02.C: Likewise. * g++.dg/cpp0x/defaulted23.C: Likewise. * g++.dg/cpp0x/noexcept08.C: Likewise. * g++.dg/cpp0x/auto9.C: Likewise. * g++.dg/cpp0x/lambda/lambda-eh2.C: Likewise. * g++.dg/cpp0x/error5.C: Likewise. * c-c++-common/gomp/atomic-12.c: Likewise. * c-c++-common/gomp/atomic-13.c: Likewise. * c-c++-common/gomp/atomic-14.c: Likewise. * c-c++-common/Wvarargs-2.c: Likewise. * c-c++-common/Wvarargs.c: Likewise. * c-c++-common/vector-subscript-2.c: Likewise. * g++.old-deja/g++.robertl/eb123.C: Likewise. * g++.old-deja/g++.eh/tmpl3.C: Likewise. * g++.old-deja/g++.eh/cleanup2.C: Likewise. * g++.old-deja/g++.eh/badalloc1.C: Likewise. * g++.old-deja/g++.eh/throw2.C: Likewise. * g++.old-deja/g++.eh/throw1.C: Likewise. * g++.old-deja/g++.eh/tmpl1.C: Likewise. * g++.old-deja/g++.other/new7.C: Likewise. * g++.old-deja/g++.other/crash30.C: Likewise. * g++.old-deja/g++.other/regstack.C: Likewise. * g++.old-deja/g++.other/crash28.C: Likewise. * g++.old-deja/g++.jason/bool5.C: Likewise. * g++.old-deja/g++.mike/p10416.C: Likewise. * g++.old-deja/g++.mike/eh25.C: Likewise. * g++.old-deja/g++.mike/eh55.C: Likewise. libcpp/ * include/cpplib.h (enum c_lang): Rename CLK_GNUCXX1Z to CLK_GNUCXX17 and CLK_CXX1Z to CLK_CXX17. * init.c (lang_defaults, cpp_init_builtins): Likewise. * expr.c (cpp_classify_number): Use C++17 instead of C++1z in diagnostics. libstdc++-v3/ * testsuite/libstdc++-prettyprinters/cxx17.cc: Use -std=c++17 or -std=gnu++17 instead of -std=c++1z or -std=gnu++1z. Use c++17 instead of c++1z and c++17_only instead of c++1z_only. Adjust expected diagnostics and comments refering to 1z to 17. * testsuite/30_threads/lock_guard/cons/deduction.cc: Likewise. * testsuite/30_threads/scoped_lock/cons/deduction.cc: Likewise. * testsuite/30_threads/scoped_lock/cons/1.cc: Likewise. * testsuite/30_threads/scoped_lock/requirements/typedefs.cc: Likewise. * testsuite/30_threads/scoped_lock/requirements/explicit_instantiation.cc: Likewise. * testsuite/30_threads/unique_lock/cons/deduction.cc: Likewise. * testsuite/18_support/launder/1.cc (test02): Likewise. * testsuite/18_support/launder/requirements_neg.cc: Likewise. * testsuite/18_support/launder/requirements.cc: Likewise. * testsuite/18_support/byte/requirements.cc: Likewise. * testsuite/18_support/byte/ops.cc: Likewise. * testsuite/18_support/byte/global_neg.cc: Likewise. * testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc: Likewise. * testsuite/27_io/types/4.cc: Likewise. * testsuite/25_algorithms/sample/81221.cc: Likewise. * testsuite/25_algorithms/sample/1.cc: Likewise. * testsuite/25_algorithms/sample/2.cc: Likewise. * testsuite/25_algorithms/search/searcher.cc: Likewise. * testsuite/28_regex/basic_regex/ctors/deduction.cc: Likewise. * testsuite/experimental/filesystem/path/construct/string_view.cc: Likewise. * testsuite/24_iterators/range_access_cpp17.cc: Likewise. * testsuite/24_iterators/container_access.cc: Likewise. * testsuite/ext/pb_ds/regression/hash_map_rand.cc: Likewise. * testsuite/ext/pb_ds/regression/trie_set_rand.cc: Likewise. * testsuite/ext/pb_ds/regression/hash_set_rand.cc: Likewise. * testsuite/ext/pb_ds/regression/list_update_set_rand.cc: Likewise. * testsuite/ext/pb_ds/regression/list_update_map_rand.cc: Likewise. * testsuite/ext/pb_ds/regression/priority_queue_rand.cc: Likewise. * testsuite/ext/pb_ds/regression/tree_set_rand.cc: Likewise. * testsuite/ext/pb_ds/regression/tree_map_rand.cc: Likewise. * testsuite/ext/pb_ds/regression/trie_map_rand.cc: Likewise. * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise. * testsuite/20_util/shared_ptr/cons/deduction.cc: Likewise. * testsuite/20_util/shared_ptr/cons/array.cc: Likewise. * testsuite/20_util/shared_ptr/observers/array.cc (struct A): Likewise. * testsuite/20_util/pair/cons/deduction.cc: Likewise. * testsuite/20_util/variant/deduction.cc: Likewise. * testsuite/20_util/tuple/78939.cc: Likewise. * testsuite/20_util/tuple/cons/deduction.cc: Likewise. * testsuite/20_util/void_t/1.cc: Likewise. * testsuite/20_util/duration/arithmetic/constexpr_c++17.cc: Likewise. * testsuite/20_util/unique_ptr/cons/deduction_neg.cc: Likewise. * testsuite/20_util/addressof/requirements/constexpr.cc: Likewise. * testsuite/20_util/weak_ptr/cons/deduction.cc: Likewise. * testsuite/20_util/has_unique_object_representations/requirements/typedefs.cc: Likewise. * testsuite/20_util/has_unique_object_representations/requirements/explicit_instantiation.cc: Likewise. * testsuite/20_util/has_unique_object_representations/value.cc: Likewise. * testsuite/20_util/time_point/arithmetic/constexpr.cc: Likewise. * testsuite/20_util/function_objects/invoke/59768.cc: Likewise. * testsuite/20_util/function_objects/mem_fn/80478.cc: Likewise. * testsuite/20_util/function/cons/deduction.cc: Likewise. * testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc: Likewise. * testsuite/20_util/is_aggregate/requirements/typedefs.cc: Likewise. * testsuite/20_util/is_aggregate/requirements/explicit_instantiation.cc: Likewise. * testsuite/20_util/is_aggregate/value.cc: Likewise. * testsuite/26_numerics/lcm/1.cc: Likewise. * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise. * testsuite/26_numerics/gcd/1.cc: Likewise. * testsuite/26_numerics/gcd/gcd_neg.cc: Likewise. * testsuite/26_numerics/valarray/deduction.cc: Likewise. * testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc: Likewise. * testsuite/26_numerics/headers/cmath/hypot.cc: Likewise. * testsuite/23_containers/queue/members/emplace_cxx17_return.cc: Likewise. * testsuite/23_containers/array/cons/deduction.cc: Likewise. * testsuite/23_containers/array/cons/deduction_neg.cc: Likewise. * testsuite/23_containers/deque/modifiers/emplace/cxx17_return.cc: Likewise. * testsuite/23_containers/deque/cons/deduction.cc: Likewise. * testsuite/23_containers/stack/members/emplace_cxx17_return.cc: Likewise. * testsuite/23_containers/list/modifiers/emplace/cxx17_return.cc: Likewise. * testsuite/23_containers/list/cons/deduction.cc: Likewise. * testsuite/23_containers/forward_list/modifiers/emplace_cxx17_return.cc: Likewise. * testsuite/23_containers/forward_list/cons/deduction.cc: Likewise. * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Likewise. * testsuite/23_containers/vector/modifiers/emplace/cxx17_return.cc: Likewise. * testsuite/23_containers/vector/cons/deduction.cc: Likewise. * testsuite/23_containers/vector/bool/emplace_cxx17_return.cc: Likewise. * testsuite/21_strings/basic_string/cons/char/9.cc: Likewise. * testsuite/21_strings/basic_string/cons/char/deduction.cc: Likewise. * testsuite/21_strings/basic_string/cons/char/79162.cc: Likewise. * testsuite/21_strings/basic_string/cons/wchar_t/9.cc: Likewise. * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc: Likewise. * testsuite/21_strings/basic_string/cons/wchar_t/79162.cc: Likewise. * testsuite/21_strings/basic_string_view/modifiers/swap/char/1.cc: Likewise. * testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/compare/char/2.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/compare/char/70483.cc: Likewise. * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/2.cc: Likewise. * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc: Likewise. From-SVN: r252826 --- gcc/ChangeLog | 10 + gcc/c-family/ChangeLog | 19 + gcc/c-family/c-common.h | 4 +- gcc/c-family/c-opts.c | 30 +- gcc/c-family/c.opt | 24 +- gcc/cp/ChangeLog | 39 ++ gcc/cp/Make-lang.in | 9 +- gcc/cp/call.c | 6 +- gcc/cp/class.c | 8 +- gcc/cp/constexpr.c | 2 +- gcc/cp/cp-tree.h | 2 +- gcc/cp/decl.c | 37 +- gcc/cp/lambda.c | 2 +- gcc/cp/mangle.c | 8 +- gcc/cp/parser.c | 80 ++-- gcc/cp/pt.c | 16 +- gcc/cp/typeck.c | 4 +- gcc/cp/typeck2.c | 4 +- gcc/doc/cpp.texi | 4 +- gcc/doc/invoke.texi | 42 +- gcc/dwarf2out.c | 5 + gcc/testsuite/ChangeLog | 415 ++++++++++++++++++ gcc/testsuite/c-c++-common/Wvarargs-2.c | 2 +- gcc/testsuite/c-c++-common/Wvarargs.c | 4 +- gcc/testsuite/c-c++-common/gomp/atomic-12.c | 2 +- gcc/testsuite/c-c++-common/gomp/atomic-13.c | 2 +- gcc/testsuite/c-c++-common/gomp/atomic-14.c | 2 +- .../c-c++-common/vector-subscript-2.c | 2 +- gcc/testsuite/g++.dg/concepts/alias1.C | 2 +- gcc/testsuite/g++.dg/concepts/alias2.C | 2 +- gcc/testsuite/g++.dg/concepts/alias3.C | 2 +- gcc/testsuite/g++.dg/concepts/alias4.C | 2 +- gcc/testsuite/g++.dg/concepts/auto1.C | 2 +- gcc/testsuite/g++.dg/concepts/auto3.C | 2 +- .../g++.dg/concepts/class-deduction1.C | 2 +- gcc/testsuite/g++.dg/concepts/class.C | 2 +- gcc/testsuite/g++.dg/concepts/class1.C | 2 +- gcc/testsuite/g++.dg/concepts/class2.C | 2 +- gcc/testsuite/g++.dg/concepts/class3.C | 2 +- gcc/testsuite/g++.dg/concepts/class4.C | 2 +- gcc/testsuite/g++.dg/concepts/class5.C | 2 +- gcc/testsuite/g++.dg/concepts/class6.C | 2 +- .../g++.dg/concepts/constrained-parm.C | 2 +- gcc/testsuite/g++.dg/concepts/decl-diagnose.C | 2 +- .../g++.dg/concepts/deduction-constraint1.C | 2 +- gcc/testsuite/g++.dg/concepts/diagnostic1.C | 2 +- gcc/testsuite/g++.dg/concepts/disjunction1.C | 2 +- gcc/testsuite/g++.dg/concepts/dr1430.C | 2 +- gcc/testsuite/g++.dg/concepts/equiv.C | 2 +- gcc/testsuite/g++.dg/concepts/equiv2.C | 2 +- .../g++.dg/concepts/explicit-inst1.C | 2 +- .../g++.dg/concepts/explicit-inst2.C | 2 +- .../g++.dg/concepts/explicit-inst3.C | 2 +- .../g++.dg/concepts/explicit-inst4.C | 2 +- .../g++.dg/concepts/explicit-spec1.C | 2 +- .../g++.dg/concepts/explicit-spec2.C | 2 +- .../g++.dg/concepts/explicit-spec3.C | 2 +- .../g++.dg/concepts/explicit-spec4.C | 2 +- .../g++.dg/concepts/explicit-spec5.C | 2 +- .../g++.dg/concepts/explicit-spec6.C | 2 +- gcc/testsuite/g++.dg/concepts/expression.C | 2 +- gcc/testsuite/g++.dg/concepts/expression2.C | 2 +- gcc/testsuite/g++.dg/concepts/expression3.C | 2 +- gcc/testsuite/g++.dg/concepts/feature-macro.C | 2 +- gcc/testsuite/g++.dg/concepts/fn-concept1.C | 2 +- gcc/testsuite/g++.dg/concepts/fn-concept2.C | 2 +- gcc/testsuite/g++.dg/concepts/fn1.C | 2 +- gcc/testsuite/g++.dg/concepts/fn10.C | 2 +- gcc/testsuite/g++.dg/concepts/fn2.C | 2 +- gcc/testsuite/g++.dg/concepts/fn3.C | 2 +- gcc/testsuite/g++.dg/concepts/fn4.C | 2 +- gcc/testsuite/g++.dg/concepts/fn5.C | 2 +- gcc/testsuite/g++.dg/concepts/fn6.C | 2 +- gcc/testsuite/g++.dg/concepts/fn7.C | 2 +- gcc/testsuite/g++.dg/concepts/fn8.C | 2 +- gcc/testsuite/g++.dg/concepts/fn9.C | 2 +- gcc/testsuite/g++.dg/concepts/friend1.C | 2 +- gcc/testsuite/g++.dg/concepts/friend2.C | 2 +- .../g++.dg/concepts/generic-fn-err.C | 2 +- gcc/testsuite/g++.dg/concepts/generic-fn.C | 2 +- gcc/testsuite/g++.dg/concepts/iconv1.C | 2 +- gcc/testsuite/g++.dg/concepts/inherit-ctor1.C | 2 +- gcc/testsuite/g++.dg/concepts/inherit-ctor2.C | 2 +- gcc/testsuite/g++.dg/concepts/inherit-ctor3.C | 2 +- gcc/testsuite/g++.dg/concepts/inherit-ctor4.C | 2 +- gcc/testsuite/g++.dg/concepts/intro1.C | 2 +- gcc/testsuite/g++.dg/concepts/intro2.C | 2 +- gcc/testsuite/g++.dg/concepts/intro3.C | 2 +- gcc/testsuite/g++.dg/concepts/intro4.C | 2 +- gcc/testsuite/g++.dg/concepts/intro5.C | 2 +- gcc/testsuite/g++.dg/concepts/intro6.C | 2 +- gcc/testsuite/g++.dg/concepts/intro7.C | 2 +- .../g++.dg/concepts/member-concept.C | 2 +- gcc/testsuite/g++.dg/concepts/memfun-err.C | 2 +- gcc/testsuite/g++.dg/concepts/memfun.C | 2 +- gcc/testsuite/g++.dg/concepts/memfun2.C | 2 +- gcc/testsuite/g++.dg/concepts/memtmpl1.C | 2 +- .../g++.dg/concepts/partial-concept-id1.C | 2 +- .../g++.dg/concepts/partial-concept-id2.C | 2 +- gcc/testsuite/g++.dg/concepts/partial-spec.C | 2 +- gcc/testsuite/g++.dg/concepts/partial-spec2.C | 2 +- gcc/testsuite/g++.dg/concepts/partial-spec3.C | 2 +- gcc/testsuite/g++.dg/concepts/partial-spec4.C | 2 +- gcc/testsuite/g++.dg/concepts/partial-spec5.C | 2 +- gcc/testsuite/g++.dg/concepts/partial-spec6.C | 2 +- gcc/testsuite/g++.dg/concepts/placeholder1.C | 2 +- gcc/testsuite/g++.dg/concepts/placeholder2.C | 2 +- gcc/testsuite/g++.dg/concepts/placeholder3.C | 2 +- gcc/testsuite/g++.dg/concepts/placeholder4.C | 2 +- gcc/testsuite/g++.dg/concepts/placeholder5.C | 2 +- gcc/testsuite/g++.dg/concepts/placeholder6.C | 2 +- gcc/testsuite/g++.dg/concepts/pr65552.C | 2 +- gcc/testsuite/g++.dg/concepts/pr65575.C | 2 +- gcc/testsuite/g++.dg/concepts/pr65634.C | 2 +- gcc/testsuite/g++.dg/concepts/pr65636.C | 2 +- gcc/testsuite/g++.dg/concepts/pr65681.C | 2 +- gcc/testsuite/g++.dg/concepts/pr65848.C | 2 +- gcc/testsuite/g++.dg/concepts/pr65854.C | 2 +- gcc/testsuite/g++.dg/concepts/pr66091.C | 2 +- gcc/testsuite/g++.dg/concepts/pr67249.C | 2 +- gcc/testsuite/g++.dg/concepts/pr68434.C | 2 +- gcc/testsuite/g++.dg/concepts/pr68683.C | 2 +- .../g++.dg/concepts/regress/alias-decl-42.C | 2 +- gcc/testsuite/g++.dg/concepts/req-neg1.C | 2 +- gcc/testsuite/g++.dg/concepts/req1.C | 2 +- gcc/testsuite/g++.dg/concepts/req10.C | 2 +- gcc/testsuite/g++.dg/concepts/req11.C | 2 +- gcc/testsuite/g++.dg/concepts/req12.C | 2 +- gcc/testsuite/g++.dg/concepts/req13.C | 2 +- gcc/testsuite/g++.dg/concepts/req14.C | 2 +- gcc/testsuite/g++.dg/concepts/req15.C | 2 +- gcc/testsuite/g++.dg/concepts/req16.C | 2 +- gcc/testsuite/g++.dg/concepts/req17.C | 2 +- gcc/testsuite/g++.dg/concepts/req18.C | 2 +- gcc/testsuite/g++.dg/concepts/req19.C | 2 +- gcc/testsuite/g++.dg/concepts/req2.C | 2 +- gcc/testsuite/g++.dg/concepts/req20.C | 2 +- gcc/testsuite/g++.dg/concepts/req3.C | 2 +- gcc/testsuite/g++.dg/concepts/req4.C | 2 +- gcc/testsuite/g++.dg/concepts/req5.C | 2 +- gcc/testsuite/g++.dg/concepts/req6.C | 2 +- gcc/testsuite/g++.dg/concepts/req7.C | 2 +- gcc/testsuite/g++.dg/concepts/req8.C | 2 +- gcc/testsuite/g++.dg/concepts/req9.C | 2 +- .../g++.dg/concepts/template-parm1.C | 2 +- .../g++.dg/concepts/template-parm10.C | 2 +- .../g++.dg/concepts/template-parm11.C | 2 +- .../g++.dg/concepts/template-parm12.C | 2 +- .../g++.dg/concepts/template-parm2.C | 2 +- .../g++.dg/concepts/template-parm3.C | 2 +- .../g++.dg/concepts/template-parm4.C | 2 +- .../g++.dg/concepts/template-parm5.C | 2 +- .../g++.dg/concepts/template-parm6.C | 2 +- .../g++.dg/concepts/template-parm7.C | 2 +- .../g++.dg/concepts/template-parm8.C | 2 +- .../g++.dg/concepts/template-parm9.C | 2 +- .../g++.dg/concepts/template-template-parm1.C | 2 +- gcc/testsuite/g++.dg/concepts/traits1.C | 2 +- gcc/testsuite/g++.dg/concepts/traits2.C | 2 +- gcc/testsuite/g++.dg/concepts/var-concept1.C | 2 +- gcc/testsuite/g++.dg/concepts/var-concept2.C | 2 +- gcc/testsuite/g++.dg/concepts/var-concept3.C | 2 +- gcc/testsuite/g++.dg/concepts/var-concept4.C | 2 +- gcc/testsuite/g++.dg/concepts/var-concept5.C | 2 +- gcc/testsuite/g++.dg/concepts/var-concept6.C | 2 +- gcc/testsuite/g++.dg/concepts/var-templ1.C | 2 +- gcc/testsuite/g++.dg/concepts/var-templ2.C | 2 +- gcc/testsuite/g++.dg/concepts/var-templ3.C | 2 +- gcc/testsuite/g++.dg/concepts/variadic1.C | 2 +- gcc/testsuite/g++.dg/concepts/variadic2.C | 2 +- gcc/testsuite/g++.dg/concepts/variadic4.C | 2 +- gcc/testsuite/g++.dg/cpp/pr23827_cxx98_neg.C | 2 +- gcc/testsuite/g++.dg/cpp0x/auto9.C | 10 +- gcc/testsuite/g++.dg/cpp0x/defaulted23.C | 16 +- gcc/testsuite/g++.dg/cpp0x/error5.C | 2 +- .../g++.dg/cpp0x/lambda/lambda-eh2.C | 2 +- gcc/testsuite/g++.dg/cpp0x/noexcept02.C | 8 +- gcc/testsuite/g++.dg/cpp0x/noexcept08.C | 28 +- gcc/testsuite/g++.dg/cpp0x/noexcept19.C | 2 +- gcc/testsuite/g++.dg/cpp0x/static_assert8.C | 2 +- gcc/testsuite/g++.dg/cpp0x/variadic-throw.C | 8 +- gcc/testsuite/g++.dg/cpp0x/variadic73.C | 2 +- gcc/testsuite/g++.dg/cpp1z/abbrev1.C | 2 +- gcc/testsuite/g++.dg/cpp1z/abbrev2.C | 2 +- gcc/testsuite/g++.dg/cpp1z/aggr-base1.C | 2 +- gcc/testsuite/g++.dg/cpp1z/aggr-base2.C | 4 +- gcc/testsuite/g++.dg/cpp1z/aggr-base2a.C | 2 +- gcc/testsuite/g++.dg/cpp1z/aggr-base3.C | 2 +- gcc/testsuite/g++.dg/cpp1z/aggr-base4.C | 2 +- gcc/testsuite/g++.dg/cpp1z/aggr-base5.C | 2 +- gcc/testsuite/g++.dg/cpp1z/aggr-base6.C | 2 +- gcc/testsuite/g++.dg/cpp1z/aligned-new1.C | 2 +- gcc/testsuite/g++.dg/cpp1z/aligned-new2.C | 2 +- gcc/testsuite/g++.dg/cpp1z/aligned-new3.C | 2 +- gcc/testsuite/g++.dg/cpp1z/aligned-new7.C | 2 +- .../g++.dg/cpp1z/attributes-enum-1.C | 2 +- .../g++.dg/cpp1z/attributes-enum-1a.C | 2 +- gcc/testsuite/g++.dg/cpp1z/bool-increment1.C | 2 +- gcc/testsuite/g++.dg/cpp1z/byte1.C | 2 +- gcc/testsuite/g++.dg/cpp1z/class-deduction1.C | 2 +- .../g++.dg/cpp1z/class-deduction10.C | 2 +- .../g++.dg/cpp1z/class-deduction11.C | 2 +- .../g++.dg/cpp1z/class-deduction12.C | 2 +- .../g++.dg/cpp1z/class-deduction13.C | 2 +- .../g++.dg/cpp1z/class-deduction14.C | 2 +- .../g++.dg/cpp1z/class-deduction15.C | 2 +- .../g++.dg/cpp1z/class-deduction16.C | 2 +- .../g++.dg/cpp1z/class-deduction17.C | 2 +- .../g++.dg/cpp1z/class-deduction18.C | 2 +- .../g++.dg/cpp1z/class-deduction19.C | 2 +- gcc/testsuite/g++.dg/cpp1z/class-deduction2.C | 2 +- .../g++.dg/cpp1z/class-deduction20.C | 2 +- .../g++.dg/cpp1z/class-deduction21.C | 2 +- .../g++.dg/cpp1z/class-deduction22.C | 2 +- .../g++.dg/cpp1z/class-deduction23.C | 2 +- .../g++.dg/cpp1z/class-deduction24.C | 2 +- .../g++.dg/cpp1z/class-deduction25.C | 2 +- .../g++.dg/cpp1z/class-deduction26.C | 2 +- .../g++.dg/cpp1z/class-deduction27.C | 2 +- .../g++.dg/cpp1z/class-deduction28.C | 2 +- .../g++.dg/cpp1z/class-deduction29.C | 2 +- gcc/testsuite/g++.dg/cpp1z/class-deduction3.C | 2 +- .../g++.dg/cpp1z/class-deduction30.C | 2 +- .../g++.dg/cpp1z/class-deduction31.C | 2 +- .../g++.dg/cpp1z/class-deduction32.C | 2 +- .../g++.dg/cpp1z/class-deduction33.C | 2 +- .../g++.dg/cpp1z/class-deduction34.C | 2 +- .../g++.dg/cpp1z/class-deduction35.C | 2 +- .../g++.dg/cpp1z/class-deduction36.C | 2 +- .../g++.dg/cpp1z/class-deduction38.C | 2 +- .../g++.dg/cpp1z/class-deduction39.C | 2 +- gcc/testsuite/g++.dg/cpp1z/class-deduction4.C | 2 +- .../g++.dg/cpp1z/class-deduction40.C | 2 +- .../g++.dg/cpp1z/class-deduction41.C | 2 +- .../g++.dg/cpp1z/class-deduction42.C | 2 +- .../g++.dg/cpp1z/class-deduction43.C | 2 +- gcc/testsuite/g++.dg/cpp1z/class-deduction5.C | 2 +- gcc/testsuite/g++.dg/cpp1z/class-deduction6.C | 2 +- gcc/testsuite/g++.dg/cpp1z/class-deduction7.C | 2 +- gcc/testsuite/g++.dg/cpp1z/class-deduction8.C | 2 +- gcc/testsuite/g++.dg/cpp1z/class-deduction9.C | 2 +- gcc/testsuite/g++.dg/cpp1z/constexpr-if10.C | 2 +- gcc/testsuite/g++.dg/cpp1z/constexpr-if11.C | 2 +- gcc/testsuite/g++.dg/cpp1z/constexpr-if12.C | 2 +- .../g++.dg/cpp1z/constexpr-lambda1.C | 2 +- .../g++.dg/cpp1z/constexpr-lambda10.C | 2 +- .../g++.dg/cpp1z/constexpr-lambda11.C | 2 +- .../g++.dg/cpp1z/constexpr-lambda12.C | 2 +- .../g++.dg/cpp1z/constexpr-lambda13.C | 2 +- .../g++.dg/cpp1z/constexpr-lambda2.C | 2 +- .../g++.dg/cpp1z/constexpr-lambda3.C | 2 +- .../g++.dg/cpp1z/constexpr-lambda4.C | 2 +- .../g++.dg/cpp1z/constexpr-lambda5.C | 2 +- .../g++.dg/cpp1z/constexpr-lambda6.C | 2 +- .../g++.dg/cpp1z/constexpr-lambda7.C | 2 +- .../g++.dg/cpp1z/constexpr-lambda8.C | 2 +- .../g++.dg/cpp1z/constexpr-lambda9.C | 2 +- gcc/testsuite/g++.dg/cpp1z/cplusplus.C | 2 +- gcc/testsuite/g++.dg/cpp1z/decomp-bitfield1.C | 2 +- .../g++.dg/cpp1z/decomp-constexpr1.C | 2 +- gcc/testsuite/g++.dg/cpp1z/decomp10.C | 2 +- gcc/testsuite/g++.dg/cpp1z/decomp11.C | 2 +- gcc/testsuite/g++.dg/cpp1z/decomp12.C | 2 +- gcc/testsuite/g++.dg/cpp1z/decomp15.C | 2 +- gcc/testsuite/g++.dg/cpp1z/decomp16.C | 2 +- gcc/testsuite/g++.dg/cpp1z/decomp17.C | 2 +- gcc/testsuite/g++.dg/cpp1z/decomp20.C | 2 +- gcc/testsuite/g++.dg/cpp1z/decomp21.C | 2 +- gcc/testsuite/g++.dg/cpp1z/decomp27.C | 2 +- gcc/testsuite/g++.dg/cpp1z/decomp3.C | 42 +- gcc/testsuite/g++.dg/cpp1z/decomp30.C | 2 +- gcc/testsuite/g++.dg/cpp1z/decomp4.C | 18 +- gcc/testsuite/g++.dg/cpp1z/decomp9.C | 2 +- .../g++.dg/cpp1z/direct-enum-init1.C | 66 +-- gcc/testsuite/g++.dg/cpp1z/elide1.C | 2 +- gcc/testsuite/g++.dg/cpp1z/eval-order2.C | 2 +- gcc/testsuite/g++.dg/cpp1z/eval-order3.C | 2 +- gcc/testsuite/g++.dg/cpp1z/fallthrough1.C | 2 +- gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C | 2 +- gcc/testsuite/g++.dg/cpp1z/fold-ice1.C | 2 +- gcc/testsuite/g++.dg/cpp1z/fold-mangle.C | 2 +- gcc/testsuite/g++.dg/cpp1z/fold1.C | 2 +- gcc/testsuite/g++.dg/cpp1z/fold2.C | 2 +- gcc/testsuite/g++.dg/cpp1z/fold3.C | 2 +- gcc/testsuite/g++.dg/cpp1z/fold4.C | 2 +- gcc/testsuite/g++.dg/cpp1z/fold5.C | 2 +- gcc/testsuite/g++.dg/cpp1z/fold6.C | 2 +- gcc/testsuite/g++.dg/cpp1z/fold7.C | 2 +- gcc/testsuite/g++.dg/cpp1z/fold7a.C | 2 +- gcc/testsuite/g++.dg/cpp1z/fold8.C | 2 +- gcc/testsuite/g++.dg/cpp1z/fold9.C | 2 +- gcc/testsuite/g++.dg/cpp1z/init-statement2.C | 2 +- gcc/testsuite/g++.dg/cpp1z/init-statement3.C | 2 +- gcc/testsuite/g++.dg/cpp1z/init-statement4.C | 2 +- gcc/testsuite/g++.dg/cpp1z/init-statement5.C | 2 +- gcc/testsuite/g++.dg/cpp1z/init-statement6.C | 2 +- gcc/testsuite/g++.dg/cpp1z/init-statement7.C | 2 +- gcc/testsuite/g++.dg/cpp1z/init-statement8.C | 2 +- gcc/testsuite/g++.dg/cpp1z/init-statement9.C | 2 +- gcc/testsuite/g++.dg/cpp1z/inline-var1.C | 2 +- gcc/testsuite/g++.dg/cpp1z/inline-var1a.C | 2 +- gcc/testsuite/g++.dg/cpp1z/inline-var2.C | 8 +- gcc/testsuite/g++.dg/cpp1z/lambda-this3.C | 2 +- .../g++.dg/cpp1z/namespace-attribs.C | 2 +- .../g++.dg/cpp1z/nested-namespace-def1.C | 2 +- gcc/testsuite/g++.dg/cpp1z/nodiscard3.C | 2 +- gcc/testsuite/g++.dg/cpp1z/noexcept-type1.C | 2 +- gcc/testsuite/g++.dg/cpp1z/noexcept-type12.C | 2 +- gcc/testsuite/g++.dg/cpp1z/noexcept-type16.C | 2 +- gcc/testsuite/g++.dg/cpp1z/noexcept-type17.C | 2 +- gcc/testsuite/g++.dg/cpp1z/noexcept-type2.C | 2 +- gcc/testsuite/g++.dg/cpp1z/noexcept-type3.C | 2 +- gcc/testsuite/g++.dg/cpp1z/noexcept-type4.C | 2 +- gcc/testsuite/g++.dg/cpp1z/noexcept-type5.C | 2 +- gcc/testsuite/g++.dg/cpp1z/noexcept-type6.C | 2 +- gcc/testsuite/g++.dg/cpp1z/noexcept-type7.C | 2 +- gcc/testsuite/g++.dg/cpp1z/noexcept-type8.C | 2 +- gcc/testsuite/g++.dg/cpp1z/noexcept-type9.C | 2 +- gcc/testsuite/g++.dg/cpp1z/nontype-auto1.C | 2 +- gcc/testsuite/g++.dg/cpp1z/nontype-auto10.C | 2 +- gcc/testsuite/g++.dg/cpp1z/nontype-auto2.C | 2 +- gcc/testsuite/g++.dg/cpp1z/nontype-auto3.C | 2 +- gcc/testsuite/g++.dg/cpp1z/nontype-auto4.C | 2 +- gcc/testsuite/g++.dg/cpp1z/nontype-auto5.C | 2 +- gcc/testsuite/g++.dg/cpp1z/nontype-auto6.C | 2 +- gcc/testsuite/g++.dg/cpp1z/nontype-auto7.C | 2 +- gcc/testsuite/g++.dg/cpp1z/nontype-auto8.C | 2 +- gcc/testsuite/g++.dg/cpp1z/nontype-auto9.C | 2 +- gcc/testsuite/g++.dg/cpp1z/nontype1.C | 2 +- gcc/testsuite/g++.dg/cpp1z/nontype2.C | 2 +- gcc/testsuite/g++.dg/cpp1z/nontype3.C | 2 +- gcc/testsuite/g++.dg/cpp1z/nontype3a.C | 2 +- gcc/testsuite/g++.dg/cpp1z/pr78771.C | 2 +- gcc/testsuite/g++.dg/cpp1z/pr79143.C | 2 +- gcc/testsuite/g++.dg/cpp1z/range-for1.C | 2 +- gcc/testsuite/g++.dg/cpp1z/register1.C | 10 +- gcc/testsuite/g++.dg/cpp1z/register2.C | 10 +- gcc/testsuite/g++.dg/cpp1z/regress1.C | 2 +- gcc/testsuite/g++.dg/cpp1z/regress2.C | 2 +- .../g++.dg/cpp1z/static_assert-nomsg.C | 2 +- gcc/testsuite/g++.dg/cpp1z/udlit-utf8char.C | 2 +- gcc/testsuite/g++.dg/cpp1z/utf8-2.C | 2 +- gcc/testsuite/g++.dg/cpp1z/utf8-2a.C | 2 +- gcc/testsuite/g++.dg/cpp1z/utf8-neg.C | 2 +- gcc/testsuite/g++.dg/cpp1z/utf8.C | 2 +- .../g++.dg/debug/dwarf2/inline-var-1.C | 2 +- .../g++.dg/debug/dwarf2/inline-var-2.C | 2 +- gcc/testsuite/g++.dg/eh/async-unwind2.C | 8 +- gcc/testsuite/g++.dg/eh/cond4.C | 2 +- gcc/testsuite/g++.dg/eh/delete1.C | 4 +- gcc/testsuite/g++.dg/eh/ehopt1.C | 4 +- gcc/testsuite/g++.dg/eh/forced4.C | 2 +- gcc/testsuite/g++.dg/eh/init-temp2.C | 6 +- gcc/testsuite/g++.dg/eh/pr38662.C | 2 +- gcc/testsuite/g++.dg/eh/pr41819.C | 2 +- gcc/testsuite/g++.dg/eh/shadow1.C | 12 +- gcc/testsuite/g++.dg/eh/spec2.C | 20 +- gcc/testsuite/g++.dg/eh/spec3.C | 2 +- gcc/testsuite/g++.dg/eh/spec7.C | 2 +- gcc/testsuite/g++.dg/eh/spec8.C | 2 +- gcc/testsuite/g++.dg/eh/spec9.C | 2 +- gcc/testsuite/g++.dg/eh/template1.C | 2 +- gcc/testsuite/g++.dg/expr/bitfield4.C | 8 +- gcc/testsuite/g++.dg/expr/bitfield5.C | 8 +- gcc/testsuite/g++.dg/expr/bitfield6.C | 4 +- gcc/testsuite/g++.dg/expr/bool1.C | 8 +- gcc/testsuite/g++.dg/expr/bool3.C | 8 +- gcc/testsuite/g++.dg/expr/lval3.C | 2 +- gcc/testsuite/g++.dg/expr/lval4.C | 4 +- gcc/testsuite/g++.dg/ext/has_nothrow_assign.C | 2 +- .../g++.dg/ext/has_nothrow_constructor.C | 2 +- gcc/testsuite/g++.dg/ext/has_nothrow_copy-1.C | 2 +- gcc/testsuite/g++.dg/ext/has_nothrow_copy-2.C | 4 +- gcc/testsuite/g++.dg/ext/has_nothrow_copy-4.C | 2 +- gcc/testsuite/g++.dg/ext/has_nothrow_copy-5.C | 2 +- gcc/testsuite/g++.dg/ext/has_nothrow_copy-6.C | 2 +- gcc/testsuite/g++.dg/ext/has_nothrow_copy-7.C | 2 +- gcc/testsuite/g++.dg/gcov/gcov-7.C | 2 +- gcc/testsuite/g++.dg/init/new13.C | 4 +- gcc/testsuite/g++.dg/init/new25.C | 8 +- gcc/testsuite/g++.dg/lookup/exception1.C | 8 +- gcc/testsuite/g++.dg/opt/noreturn-1.C | 8 +- gcc/testsuite/g++.dg/other/error3.C | 4 +- gcc/testsuite/g++.dg/parse/error15.C | 2 +- gcc/testsuite/g++.dg/parse/linkage2.C | 2 +- gcc/testsuite/g++.dg/parse/register1.C | 2 +- gcc/testsuite/g++.dg/rtti/crash3.C | 2 +- gcc/testsuite/g++.dg/template/nontype8.C | 2 +- gcc/testsuite/g++.dg/template/partial5.C | 2 +- gcc/testsuite/g++.dg/tls/diag-2.C | 2 +- gcc/testsuite/g++.dg/tls/diag-4.C | 2 +- gcc/testsuite/g++.dg/tm/pr46567.C | 4 +- gcc/testsuite/g++.dg/tm/pr47340.C | 2 +- gcc/testsuite/g++.dg/torture/pr46364.C | 2 +- gcc/testsuite/g++.dg/torture/pr49394.C | 2 +- gcc/testsuite/g++.dg/torture/pr52918-1.C | 4 +- gcc/testsuite/g++.dg/torture/pr57190.C | 8 +- .../g++.dg/torture/stackalign/eh-alloca-1.C | 2 +- .../g++.dg/torture/stackalign/eh-fastcall-1.C | 2 +- .../g++.dg/torture/stackalign/eh-global-1.C | 2 +- .../g++.dg/torture/stackalign/eh-inline-1.C | 2 +- .../g++.dg/torture/stackalign/eh-inline-2.C | 2 +- .../g++.dg/torture/stackalign/eh-thiscall-1.C | 2 +- .../g++.dg/torture/stackalign/eh-vararg-1.C | 2 +- .../g++.dg/torture/stackalign/eh-vararg-2.C | 2 +- gcc/testsuite/g++.dg/tree-ssa/pr45605.C | 2 +- gcc/testsuite/g++.dg/ubsan/pr79589.C | 2 +- gcc/testsuite/g++.dg/warn/Wreturn-type-3.C | 2 +- gcc/testsuite/g++.dg/warn/register-parm-1.C | 4 +- gcc/testsuite/g++.dg/warn/register-var-2.C | 2 +- gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C | 6 +- gcc/testsuite/g++.old-deja/g++.eh/cleanup2.C | 8 +- gcc/testsuite/g++.old-deja/g++.eh/throw1.C | 2 +- gcc/testsuite/g++.old-deja/g++.eh/throw2.C | 2 +- gcc/testsuite/g++.old-deja/g++.eh/tmpl1.C | 2 +- gcc/testsuite/g++.old-deja/g++.eh/tmpl3.C | 4 +- gcc/testsuite/g++.old-deja/g++.jason/bool5.C | 8 +- gcc/testsuite/g++.old-deja/g++.mike/eh25.C | 2 +- gcc/testsuite/g++.old-deja/g++.mike/eh55.C | 2 +- gcc/testsuite/g++.old-deja/g++.mike/p10416.C | 2 +- .../g++.old-deja/g++.other/crash28.C | 4 +- .../g++.old-deja/g++.other/crash30.C | 2 +- gcc/testsuite/g++.old-deja/g++.other/new7.C | 2 +- .../g++.old-deja/g++.other/regstack.C | 2 +- .../g++.old-deja/g++.robertl/eb123.C | 2 +- gcc/testsuite/lib/g++-dg.exp | 4 +- gcc/testsuite/lib/target-supports.exp | 10 +- libcpp/ChangeLog | 8 + libcpp/expr.c | 2 +- libcpp/include/cpplib.h | 2 +- libcpp/init.c | 8 +- libstdc++-v3/ChangeLog | 117 +++++ .../testsuite/18_support/byte/global_neg.cc | 2 +- libstdc++-v3/testsuite/18_support/byte/ops.cc | 2 +- .../testsuite/18_support/byte/requirements.cc | 2 +- .../testsuite/18_support/launder/1.cc | 4 +- .../18_support/launder/requirements.cc | 2 +- .../18_support/launder/requirements_neg.cc | 2 +- .../uncaught_exceptions.cc | 2 +- .../addressof/requirements/constexpr.cc | 4 +- .../duration/arithmetic/constexpr_c++17.cc | 2 +- .../20_util/function/cons/deduction.cc | 2 +- .../20_util/function_objects/invoke/59768.cc | 2 +- .../20_util/function_objects/mem_fn/80478.cc | 2 +- .../requirements/explicit_instantiation.cc | 4 +- .../requirements/typedefs.cc | 4 +- .../value.cc | 4 +- .../requirements/explicit_instantiation.cc | 4 +- .../is_aggregate/requirements/typedefs.cc | 4 +- .../testsuite/20_util/is_aggregate/value.cc | 4 +- .../testsuite/20_util/pair/cons/deduction.cc | 2 +- .../20_util/shared_ptr/casts/reinterpret.cc | 2 +- .../20_util/shared_ptr/cons/array.cc | 2 +- .../20_util/shared_ptr/cons/deduction.cc | 2 +- .../20_util/shared_ptr/observers/array.cc | 2 +- .../memory_management_tools/destroy_neg.cc | 2 +- .../time_point/arithmetic/constexpr.cc | 2 +- libstdc++-v3/testsuite/20_util/tuple/78939.cc | 2 +- .../testsuite/20_util/tuple/cons/deduction.cc | 2 +- .../20_util/unique_ptr/cons/deduction_neg.cc | 2 +- .../testsuite/20_util/variant/deduction.cc | 2 +- libstdc++-v3/testsuite/20_util/void_t/1.cc | 2 +- .../20_util/weak_ptr/cons/deduction.cc | 2 +- .../basic_string/cons/char/79162.cc | 2 +- .../21_strings/basic_string/cons/char/9.cc | 2 +- .../basic_string/cons/char/deduction.cc | 2 +- .../basic_string/cons/wchar_t/79162.cc | 2 +- .../21_strings/basic_string/cons/wchar_t/9.cc | 2 +- .../basic_string/cons/wchar_t/deduction.cc | 2 +- .../modifiers/swap/char/1.cc | 2 +- .../modifiers/swap/wchar_t/1.cc | 2 +- .../operations/compare/char/2.cc | 2 +- .../operations/compare/char/70483.cc | 2 +- .../operations/compare/wchar_t/2.cc | 2 +- .../requirements/constexpr_functions_c++17.cc | 2 +- .../23_containers/array/cons/deduction.cc | 2 +- .../23_containers/array/cons/deduction_neg.cc | 2 +- .../23_containers/deque/cons/deduction.cc | 2 +- .../deque/modifiers/emplace/cxx17_return.cc | 2 +- .../forward_list/cons/deduction.cc | 2 +- .../modifiers/emplace_cxx17_return.cc | 2 +- .../23_containers/list/cons/deduction.cc | 2 +- .../list/modifiers/emplace/cxx17_return.cc | 2 +- .../queue/members/emplace_cxx17_return.cc | 2 +- .../stack/members/emplace_cxx17_return.cc | 2 +- .../unordered_set/allocator/ext_ptr.cc | 2 +- .../vector/bool/emplace_cxx17_return.cc | 2 +- .../23_containers/vector/cons/deduction.cc | 2 +- .../vector/modifiers/emplace/cxx17_return.cc | 2 +- .../24_iterators/container_access.cc | 2 +- .../24_iterators/range_access_cpp17.cc | 2 +- .../testsuite/25_algorithms/sample/1.cc | 2 +- .../testsuite/25_algorithms/sample/2.cc | 2 +- .../testsuite/25_algorithms/sample/81221.cc | 2 +- .../25_algorithms/search/searcher.cc | 2 +- libstdc++-v3/testsuite/26_numerics/gcd/1.cc | 4 +- .../testsuite/26_numerics/gcd/gcd_neg.cc | 4 +- .../26_numerics/headers/cmath/hypot.cc | 2 +- .../headers/cmath/types_std_c++0x_neg.cc | 2 +- libstdc++-v3/testsuite/26_numerics/lcm/1.cc | 4 +- .../testsuite/26_numerics/lcm/lcm_neg.cc | 4 +- .../26_numerics/valarray/deduction.cc | 2 +- libstdc++-v3/testsuite/27_io/types/4.cc | 2 +- .../28_regex/basic_regex/ctors/deduction.cc | 2 +- .../30_threads/lock_guard/cons/deduction.cc | 2 +- .../30_threads/scoped_lock/cons/1.cc | 2 +- .../30_threads/scoped_lock/cons/deduction.cc | 2 +- .../requirements/explicit_instantiation.cc | 2 +- .../scoped_lock/requirements/typedefs.cc | 2 +- .../30_threads/unique_lock/cons/deduction.cc | 2 +- .../filesystem/path/construct/string_view.cc | 4 +- .../ext/pb_ds/regression/hash_map_rand.cc | 2 +- .../ext/pb_ds/regression/hash_set_rand.cc | 2 +- .../pb_ds/regression/list_update_map_rand.cc | 2 +- .../pb_ds/regression/list_update_set_rand.cc | 2 +- .../pb_ds/regression/priority_queue_rand.cc | 2 +- .../ext/pb_ds/regression/tree_map_rand.cc | 2 +- .../ext/pb_ds/regression/tree_set_rand.cc | 2 +- .../ext/pb_ds/regression/trie_map_rand.cc | 2 +- .../ext/pb_ds/regression/trie_set_rand.cc | 2 +- .../libstdc++-prettyprinters/cxx17.cc | 4 +- 521 files changed, 1439 insertions(+), 826 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8c9988fccfb..71191121ce3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2017-09-15 Jakub Jelinek + + * doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document + c++1z and gnu++1z as deprecated. Change other references to + -std=c++1z to -std=c++17 and -std=gnu++1z to -std=gnu++17. + Change -Wc++1z-compat to -Wc++17-compat. + * doc/cpp.texi: Document -std=c++17 defines __cplusplus 201703L. + * dwarf2out.c (highest_c_language): Handle C++17. + (gen_compile_unit_die): Likewise. + 2017-09-15 Jakub Jelinek PR rtl-optimization/82192 diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 6391ced934d..4fffa315644 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,22 @@ +2017-09-15 Jakub Jelinek + + * c.opt (Wc++1z-compat): Change from option to undocumented alias. + (Wc++17-compat): Change from undocumented alias to option. + (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat, + change C++1z to C++17 in description. + (std=c++1z, std=gnu++1z): Change from option to undocumented + deprecated alias. + (std=c++17, std=gnu++17): Change from undocumented alias to option. + Adjust description. + * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17. + * c-opts.c (set_std_cxx1z): Rename to ... + (set_std_cxx17): ... this. + (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17 + and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z + caller. + (c_common_post_options): Use cxx17 instead of cxx1z. Adjust + comments. + 2017-09-12 H.J. Lu * c-attribs.c (common_handle_aligned_attribute): Don't warn diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index 0de549d2412..d57829bc89a 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -702,8 +702,8 @@ enum cxx_dialect { cxx11 = cxx0x, /* C++14 */ cxx14, - /* C++1z (C++17?) */ - cxx1z + /* C++17 */ + cxx17 }; /* The C++ dialect being used. C++98 is the default. */ diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index 9e7f0a361ca..cdbcd6cf874 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -110,7 +110,7 @@ static void handle_OPT_d (const char *); static void set_std_cxx98 (int); static void set_std_cxx11 (int); static void set_std_cxx14 (int); -static void set_std_cxx1z (int); +static void set_std_cxx17 (int); static void set_std_c89 (int, int); static void set_std_c99 (int); static void set_std_c11 (int); @@ -631,10 +631,10 @@ c_common_handle_option (size_t scode, const char *arg, int value, set_std_cxx14 (code == OPT_std_c__14 /* ISO */); break; - case OPT_std_c__1z: - case OPT_std_gnu__1z: + case OPT_std_c__17: + case OPT_std_gnu__17: if (!preprocessing_asm_p) - set_std_cxx1z (code == OPT_std_c__1z /* ISO */); + set_std_cxx17 (code == OPT_std_c__17 /* ISO */); break; case OPT_std_c90: @@ -886,7 +886,7 @@ c_common_post_options (const char **pfilename) /* -Wregister is enabled by default in C++17. */ if (!global_options_set.x_warn_register) - warn_register = cxx_dialect >= cxx1z; + warn_register = cxx_dialect >= cxx17; /* Declone C++ 'structors if -Os. */ if (flag_declone_ctor_dtor == -1) @@ -923,9 +923,9 @@ c_common_post_options (const char **pfilename) if (!global_options_set.x_flag_new_inheriting_ctors) flag_new_inheriting_ctors = abi_version_at_least (11); - /* For GCC 7, only enable DR150 resolution by default if -std=c++1z. */ + /* For GCC 7, only enable DR150 resolution by default if -std=c++17. */ if (!global_options_set.x_flag_new_ttp) - flag_new_ttp = (cxx_dialect >= cxx1z); + flag_new_ttp = (cxx_dialect >= cxx17); if (cxx_dialect >= cxx11) { @@ -938,7 +938,7 @@ c_common_post_options (const char **pfilename) warn_narrowing = 1; /* Unless -f{,no-}ext-numeric-literals has been used explicitly, - for -std=c++{11,14,1z} default to -fno-ext-numeric-literals. */ + for -std=c++{11,14,17} default to -fno-ext-numeric-literals. */ if (flag_iso && !global_options_set.x_flag_ext_numeric_literals) cpp_opts->ext_numeric_literals = 0; } @@ -949,7 +949,7 @@ c_common_post_options (const char **pfilename) for earlier C++ as well, so chaining works as expected. */ if (c_dialect_cxx () && flag_strong_eval_order == -1) - flag_strong_eval_order = (cxx_dialect >= cxx1z ? 2 : 1); + flag_strong_eval_order = (cxx_dialect >= cxx17 ? 2 : 1); /* Global sized deallocation is new in C++14. */ if (flag_sized_deallocation == -1) @@ -1581,7 +1581,7 @@ set_std_cxx11 (int iso) lang_hooks.name = "GNU C++11"; } -/* Set the C++ 2014 draft standard (without GNU extensions if ISO). */ +/* Set the C++ 2014 standard (without GNU extensions if ISO). */ static void set_std_cxx14 (int iso) { @@ -1596,11 +1596,11 @@ set_std_cxx14 (int iso) lang_hooks.name = "GNU C++14"; } -/* Set the C++ 201z draft standard (without GNU extensions if ISO). */ +/* Set the C++ 2017 standard (without GNU extensions if ISO). */ static void -set_std_cxx1z (int iso) +set_std_cxx17 (int iso) { - cpp_set_lang (parse_in, iso ? CLK_CXX1Z: CLK_GNUCXX1Z); + cpp_set_lang (parse_in, iso ? CLK_CXX17: CLK_GNUCXX17); flag_no_gnu_keywords = iso; flag_no_nonansi_builtin = iso; flag_iso = iso; @@ -1608,8 +1608,8 @@ set_std_cxx1z (int iso) flag_isoc94 = 1; flag_isoc99 = 1; flag_isoc11 = 1; - cxx_dialect = cxx1z; - lang_hooks.name = "GNU C++14"; /* Pretend C++14 till standarization. */ + cxx_dialect = cxx17; + lang_hooks.name = "GNU C++17"; } /* Args to -d specify what to dump. Silently ignore diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index 3435fe90cca..ed5938f0ea4 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -378,11 +378,11 @@ C++ ObjC++ Var(warn_cxx14_compat) Warning LangEnabledBy(C++ ObjC++,Wall) Warn about C++ constructs whose meaning differs between ISO C++ 2011 and ISO C++ 2014. Wc++1z-compat -C++ ObjC++ Var(warn_cxx1z_compat) Warning LangEnabledBy(C++ ObjC++,Wall) -Warn about C++ constructs whose meaning differs between ISO C++ 2014 and (forthcoming) ISO C++ 201z(7?). +C++ ObjC++ Warning Alias(Wc++17-compat) Undocumented Wc++17-compat -C++ ObjC++ Warning Alias(Wc++1z-compat) Undocumented +C++ ObjC++ Var(warn_cxx17_compat) Warning LangEnabledBy(C++ ObjC++,Wall) +Warn about C++ constructs whose meaning differs between ISO C++ 2014 and ISO C++ 2017. Wcast-qual C ObjC C++ ObjC++ Var(warn_cast_qual) Warning @@ -809,8 +809,8 @@ C++ ObjC++ Var(warn_noexcept) Warning Warn when a noexcept expression evaluates to false even though the expression can't actually throw. Wnoexcept-type -C++ ObjC++ Warning Var(warn_noexcept_type) LangEnabledBy(C++ ObjC++,Wabi || Wc++1z-compat) -Warn if C++1z noexcept function type will change the mangled name of a symbol. +C++ ObjC++ Warning Var(warn_noexcept_type) LangEnabledBy(C++ ObjC++,Wabi || Wc++17-compat) +Warn if C++17 noexcept function type will change the mangled name of a symbol. Wnon-template-friend C++ ObjC++ Var(warn_nontemplate_friend) Init(1) Warning @@ -1925,11 +1925,12 @@ C++ ObjC++ Conform to the ISO 2014 C++ standard. std=c++1z -C++ ObjC++ -Conform to the ISO 2017(?) C++ draft standard (experimental and incomplete support). +C++ ObjC++ Alias(std=c++17) Undocumented +Deprecated in favor of -std=c++17. std=c++17 -C++ ObjC++ Alias(std=c++1z) Undocumented +C++ ObjC++ +Conform to the ISO 2017 C++ standard. std=c11 C ObjC @@ -1982,11 +1983,12 @@ C++ ObjC++ Conform to the ISO 2014 C++ standard with GNU extensions. std=gnu++1z -C++ ObjC++ -Conform to the ISO 201z(7?) C++ draft standard with GNU extensions (experimental and incomplete support). +C++ ObjC++ Alias(std=gnu++17) Undocumented +Deprecated in favor of -std=gnu++17. std=gnu++17 -C++ ObjC++ Alias(std=gnu++1z) Undocumented +C++ ObjC++ +Conform to the ISO 2017 C++ standard with GNU extensions. std=gnu11 C ObjC diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1bda58141ce..0a3b80f4518 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,42 @@ +2017-09-15 Jakub Jelinek + + * decl.c (redeclaration_error_message): Use cxx17 instead of cxx1z, + adjust diagnostics refering to C++1z or -std=gnu++1z or -std=c++1z + to C++17 or -std=gnu++17 or -std=c++17. Adjust comments. + (cxx_init_decl_processing, next_initializable_field, + is_direct_enum_init, check_initializer, cp_finish_decl, + mark_inline_variable, grokdeclarator, grokparms, xref_basetypes, + finish_function): Likewise. + * cp-tree.h (DECL_INLINE_VAR_P): Likewise. + * pt.c (mark_template_parm, convert_nontype_argument, + instantiate_class_template_1, type_unification_real, unify, + get_partial_spec_bindings, dependent_type_p_r): Likewise. + * typeck.c (cp_build_unary_op): Likewise. + * constexpr.c (var_in_maybe_constexpr_fn): Likewise. + * call.c (build_user_type_conversion_1, build_over_call, + build_special_member_call): Likewise. + * lambda.c (begin_lambda_type): Likewise. + * typeck2.c (process_init_constructor_record): Likewise. + * class.c (build_base_field, finalize_literal_type_property, + explain_non_literal_class): Likewise. + * parser.c (cp_parser_diagnose_invalid_type_name, + cp_parser_primary_expression, cp_parser_lambda_introducer, + cp_parser_lambda_declarator_opt, cp_parser_selection_statement, + cp_convert_range_for, cp_parser_perform_range_for_lookup, + cp_parser_decomposition_declaration, cp_parser_linkage_specification, + cp_parser_static_assert, cp_parser_simple_type_specifier, + cp_parser_namespace_definition, cp_parser_using_declaration, + cp_parser_init_declarator, cp_parser_type_parameter_key, + cp_parser_exception_specification_opt, cp_parser_std_attribute_spec, + cp_parser_constructor_declarator_p): Likewise. + * mangle.c (struct globals): Rename need_cxx1z_warning to + need_cxx17_warning. + (write_exception_spec, start_mangling, mangle_decl): Likewise. + * Make-lang.in (check-c++1z): Rename to check-c++17, depend on + it. + (check-c++17): New goal. Use 17 instead of 1z. + (check-c++-all): Use 17 instead of 1z. + 2017-09-14 Jakub Jelinek PR c++/81314 diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in index f860645bfe5..24e9d7ced5b 100644 --- a/gcc/cp/Make-lang.in +++ b/gcc/cp/Make-lang.in @@ -169,13 +169,14 @@ c++.srcman: doc/g++.1 # entry point. We feed the former to the latter here. check-c++ : check-g++ -# Run the testsuite in C++1z mode. -check-c++1z: - $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS)" GXX_TESTSUITE_STDS=1z check-g++ +# Run the testsuite in C++17 mode. +check-c++1z: check-c++17 +check-c++17: + $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS)" GXX_TESTSUITE_STDS=17 check-g++ # Run the testsuite in all standard conformance levels. check-c++-all: - $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) --stds=98,11,14,1z,concepts" check-g++ + $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) --stds=98,11,14,17,concepts" check-g++ # Run the testsuite with garbage collection at every opportunity. check-g++-strict-gc: diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 88af0d31446..4fa0d035c80 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -3743,7 +3743,7 @@ build_user_type_conversion_1 (tree totype, tree expr, int flags, /* FIXME P0135 doesn't say what to do in C++17 about list-initialization from a single element. For now, let's handle constructors as before and also consider conversion operators from the element. */ - if (cxx_dialect >= cxx1z + if (cxx_dialect >= cxx17 && BRACE_ENCLOSED_INITIALIZER_P (expr) && CONSTRUCTOR_NELTS (expr) == 1) fromtype = TREE_TYPE (CONSTRUCTOR_ELT (expr, 0)->value); @@ -8035,7 +8035,7 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain) /* In C++17 we shouldn't be copying a TARGET_EXPR except into a base subobject. */ - if (CHECKING_P && cxx_dialect >= cxx1z) + if (CHECKING_P && cxx_dialect >= cxx17) gcc_assert (TREE_CODE (arg) != TARGET_EXPR /* It's from binding the ref parm to a packed field. */ || convs[0]->need_temporary_p @@ -8792,7 +8792,7 @@ build_special_member_call (tree instance, tree name, vec **args, of the destination, the initializer expression is used to initialize the destination object." Handle that here to avoid doing overload resolution. */ - if (cxx_dialect >= cxx1z + if (cxx_dialect >= cxx17 && args && vec_safe_length (*args) == 1 && name == complete_ctor_identifier) { diff --git a/gcc/cp/class.c b/gcc/cp/class.c index cd63c21567a..97e29c0604e 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -4317,7 +4317,7 @@ build_base_field (record_layout_info rli, tree binfo, back end issues with overlapping FIELD_DECLs, but that doesn't seem to be a problem anymore. We need them to handle initialization of C++17 aggregate bases. */ - if (cxx_dialect >= cxx1z && !BINFO_VIRTUAL_P (binfo)) + if (cxx_dialect >= cxx17 && !BINFO_VIRTUAL_P (binfo)) { tree decl = build_base_field_1 (t, basetype, next_field); DECL_FIELD_OFFSET (decl) = BINFO_OFFSET (binfo); @@ -5351,7 +5351,7 @@ finalize_literal_type_property (tree t) || TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)) CLASSTYPE_LITERAL_P (t) = false; else if (CLASSTYPE_LITERAL_P (t) && LAMBDA_TYPE_P (t)) - CLASSTYPE_LITERAL_P (t) = (cxx_dialect >= cxx1z); + CLASSTYPE_LITERAL_P (t) = (cxx_dialect >= cxx17); else if (CLASSTYPE_LITERAL_P (t) && !TYPE_HAS_TRIVIAL_DFLT (t) && CLASSTYPE_NON_AGGREGATE (t) && !TYPE_HAS_CONSTEXPR_CTOR (t)) @@ -5394,9 +5394,9 @@ explain_non_literal_class (tree t) return; inform (0, "%q+T is not literal because:", t); - if (cxx_dialect < cxx1z && LAMBDA_TYPE_P (t)) + if (cxx_dialect < cxx17 && LAMBDA_TYPE_P (t)) inform (0, " %qT is a closure type, which is only literal in " - "C++1z and later", t); + "C++17 and later", t); else if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)) inform (0, " %q+T has a non-trivial destructor", t); else if (CLASSTYPE_NON_AGGREGATE (t) diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 2d2f3b854ba..a89ee499394 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -3304,7 +3304,7 @@ var_in_constexpr_fn (tree t) bool var_in_maybe_constexpr_fn (tree t) { - if (cxx_dialect >= cxx1z + if (cxx_dialect >= cxx17 && DECL_FUNCTION_SCOPE_P (t) && LAMBDA_FUNCTION_P (DECL_CONTEXT (t))) return true; diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index f4d6f802cbe..e5085989e7d 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -3884,7 +3884,7 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter) declared with constexpr specifier are implicitly inline variables. */ #define DECL_INLINE_VAR_P(NODE) \ (DECL_VAR_DECLARED_INLINE_P (NODE) \ - || (cxx_dialect >= cxx1z \ + || (cxx_dialect >= cxx17 \ && DECL_DECLARED_CONSTEXPR_P (NODE) \ && DECL_CLASS_SCOPE_P (NODE))) diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 6101bdf2bc8..858747eecfc 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -2909,7 +2909,7 @@ redeclaration_error_message (tree newdecl, tree olddecl) if the variable is defined within the class with constexpr specifier is declaration rather than definition (and deprecated). */ - if (cxx_dialect >= cxx1z + if (cxx_dialect >= cxx17 && DECL_CLASS_SCOPE_P (olddecl) && DECL_DECLARED_CONSTEXPR_P (olddecl) && !DECL_INITIAL (newdecl)) @@ -4050,7 +4050,7 @@ cxx_init_decl_processing (void) std_node = current_namespace; pop_namespace (); - flag_noexcept_type = (cxx_dialect >= cxx1z); + flag_noexcept_type = (cxx_dialect >= cxx17); c_common_nodes_and_builtins (); @@ -4150,7 +4150,7 @@ cxx_init_decl_processing (void) aligned_new_threshold = 1; } if (aligned_new_threshold == -1) - aligned_new_threshold = (cxx_dialect >= cxx1z) ? 1 : 0; + aligned_new_threshold = (cxx_dialect >= cxx17) ? 1 : 0; if (aligned_new_threshold == 1) aligned_new_threshold = malloc_alignment () / BITS_PER_UNIT; @@ -5573,7 +5573,7 @@ next_initializable_field (tree field) && (TREE_CODE (field) != FIELD_DECL || (DECL_C_BIT_FIELD (field) && !DECL_NAME (field)) || (DECL_ARTIFICIAL (field) - && !(cxx_dialect >= cxx1z && DECL_FIELD_IS_BASE (field))))) + && !(cxx_dialect >= cxx17 && DECL_FIELD_IS_BASE (field))))) field = DECL_CHAIN (field); return field; @@ -5585,7 +5585,7 @@ next_initializable_field (tree field) bool is_direct_enum_init (tree type, tree init) { - if (cxx_dialect >= cxx1z + if (cxx_dialect >= cxx17 && TREE_CODE (type) == ENUMERAL_TYPE && ENUM_FIXED_UNDERLYING_TYPE_P (type) && TREE_CODE (init) == CONSTRUCTOR @@ -6351,7 +6351,7 @@ check_initializer (tree decl, tree init, int flags, vec **cleanups) if (cxx_dialect < cxx11) error ("initializer invalid for static member with constructor"); - else if (cxx_dialect < cxx1z) + else if (cxx_dialect < cxx17) error ("non-constant in-class initialization invalid for static " "member %qD", decl); else @@ -6727,9 +6727,9 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p, or local register variable extension. */ if (VAR_P (decl) && DECL_REGISTER (decl) && asmspec_tree == NULL_TREE) { - if (cxx_dialect >= cxx1z) + if (cxx_dialect >= cxx17) pedwarn (DECL_SOURCE_LOCATION (decl), OPT_Wregister, - "ISO C++1z does not allow % storage " + "ISO C++17 does not allow % storage " "class specifier"); else warning_at (DECL_SOURCE_LOCATION (decl), OPT_Wregister, @@ -9787,10 +9787,10 @@ mark_inline_variable (tree decl) "%qD declared at block scope", decl); inlinep = false; } - else if (cxx_dialect < cxx1z) + else if (cxx_dialect < cxx17) pedwarn (DECL_SOURCE_LOCATION (decl), 0, "inline variables are only available " - "with -std=c++1z or -std=gnu++1z"); + "with -std=c++17 or -std=gnu++17"); if (inlinep) { retrofit_lang_decl (decl); @@ -10522,7 +10522,7 @@ grokdeclarator (const cp_declarator *declarator, /* We might have ignored or rejected some of the qualifiers. */ type_quals = cp_type_quals (type); - if (cxx_dialect >= cxx1z && type && is_auto (type) + if (cxx_dialect >= cxx17 && type && is_auto (type) && innermost_code != cdk_function && id_declarator && declarator != id_declarator) if (tree tmpl = CLASS_PLACEHOLDER_TEMPLATE (type)) @@ -11730,7 +11730,7 @@ grokdeclarator (const cp_declarator *declarator, error ("cannot use %<::%> in parameter declaration"); if (type_uses_auto (type) - && !(cxx_dialect >= cxx1z && template_parm_flag)) + && !(cxx_dialect >= cxx17 && template_parm_flag)) { if (cxx_dialect >= cxx14) error ("% parameter not permitted in this context"); @@ -12063,7 +12063,7 @@ grokdeclarator (const cp_declarator *declarator, mark_inline_variable (decl); if (!DECL_VAR_DECLARED_INLINE_P (decl) - && !(cxx_dialect >= cxx1z && constexpr_p)) + && !(cxx_dialect >= cxx17 && constexpr_p)) /* Even if there is an in-class initialization, DECL is considered undefined until an out-of-class definition is provided, unless this is an inline @@ -12332,9 +12332,9 @@ grokdeclarator (const cp_declarator *declarator, /* Warn about register storage specifiers on PARM_DECLs. */ if (TREE_CODE (decl) == PARM_DECL) { - if (cxx_dialect >= cxx1z) + if (cxx_dialect >= cxx17) pedwarn (DECL_SOURCE_LOCATION (decl), OPT_Wregister, - "ISO C++1z does not allow % storage " + "ISO C++17 does not allow % storage " "class specifier"); else warning_at (DECL_SOURCE_LOCATION (decl), OPT_Wregister, @@ -12601,8 +12601,7 @@ grokparms (tree parmlist, tree *parms) } else if (abstract_virtuals_error (decl, type)) any_error = 1; /* Seems like a good idea. */ - else if (cxx_dialect < cxx1z - && POINTER_TYPE_P (type)) + else if (cxx_dialect < cxx17 && POINTER_TYPE_P (type)) { /* Before C++17 DR 393: [dcl.fct]/6, parameter types cannot contain pointers @@ -13803,7 +13802,7 @@ xref_basetypes (tree ref, tree base_list) /* Before C++17, an aggregate cannot have base classes. In C++17, an aggregate can't have virtual, private, or protected base classes. */ - if (cxx_dialect < cxx1z + if (cxx_dialect < cxx17 || access != access_public_node || via_virtual) CLASSTYPE_NON_AGGREGATE (ref) = true; @@ -15574,7 +15573,7 @@ finish_function (int flags) check_function_concept (fndecl); /* Lambda closure members are implicitly constexpr if possible. */ - if (cxx_dialect >= cxx1z + if (cxx_dialect >= cxx17 && LAMBDA_TYPE_P (CP_DECL_CONTEXT (fndecl))) DECL_DECLARED_CONSTEXPR_P (fndecl) = ((processing_template_decl diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c index 9ba3df10363..e4412569a61 100644 --- a/gcc/cp/lambda.c +++ b/gcc/cp/lambda.c @@ -155,7 +155,7 @@ begin_lambda_type (tree lambda) /* In C++17, assume the closure is literal; we'll clear the flag later if necessary. */ - if (cxx_dialect >= cxx1z) + if (cxx_dialect >= cxx17) CLASSTYPE_LITERAL_P (type) = true; /* Clear base types. */ diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index 15f442133e6..33cd00e3314 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -116,7 +116,7 @@ struct GTY(()) globals { bool need_abi_warning; /* True if the mangling will be different in C++17 mode. */ - bool need_cxx1z_warning; + bool need_cxx17_warning; }; static GTY (()) globals G; @@ -362,7 +362,7 @@ write_exception_spec (tree spec) if (!flag_noexcept_type) { - G.need_cxx1z_warning = true; + G.need_cxx17_warning = true; return; } @@ -3666,7 +3666,7 @@ start_mangling (const tree entity) { G.entity = entity; G.need_abi_warning = false; - G.need_cxx1z_warning = false; + G.need_cxx17_warning = false; obstack_free (&name_obstack, name_base); mangle_obstack = &name_obstack; name_base = obstack_alloc (&name_obstack, 0); @@ -3853,7 +3853,7 @@ mangle_decl (const tree decl) } SET_DECL_ASSEMBLER_NAME (decl, id); - if (G.need_cxx1z_warning + if (G.need_cxx17_warning && (TREE_PUBLIC (decl) || DECL_REALLY_EXTERN (decl))) warning_at (DECL_SOURCE_LOCATION (decl), OPT_Wnoexcept_type, "mangled name for %qD will change in C++17 because the " diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 4bfae3655d5..c9cb3cbe55b 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -3163,9 +3163,9 @@ cp_parser_diagnose_invalid_type_name (cp_parser *parser, tree id, error_at (location, "invalid use of template-name %qE without an argument list", decl); - if (DECL_CLASS_TEMPLATE_P (decl) && cxx_dialect < cxx1z) + if (DECL_CLASS_TEMPLATE_P (decl) && cxx_dialect < cxx17) inform (location, "class template argument deduction is only available " - "with -std=c++1z or -std=gnu++1z"); + "with -std=c++17 or -std=gnu++17"); inform (DECL_SOURCE_LOCATION (decl), "%qD declared here", decl); } else if (TREE_CODE (id) == BIT_NOT_EXPR) @@ -5034,10 +5034,10 @@ cp_parser_primary_expression (cp_parser *parser, { expr = cp_parser_fold_expression (parser, expr); if (expr != error_mark_node - && cxx_dialect < cxx1z + && cxx_dialect < cxx17 && !in_system_header_at (input_location)) pedwarn (input_location, 0, "fold-expressions only available " - "with -std=c++1z or -std=gnu++1z"); + "with -std=c++17 or -std=gnu++17"); } else /* Let the front end know that this expression was @@ -10200,9 +10200,9 @@ cp_parser_lambda_introducer (cp_parser* parser, tree lambda_expr) && cp_lexer_nth_token_is_keyword (parser->lexer, 2, RID_THIS)) { location_t loc = cp_lexer_peek_token (parser->lexer)->location; - if (cxx_dialect < cxx1z) + if (cxx_dialect < cxx17) pedwarn (loc, 0, "%<*this%> capture only available with " - "-std=c++1z or -std=gnu++1z"); + "-std=c++17 or -std=gnu++17"); cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer); add_capture (lambda_expr, @@ -10474,12 +10474,12 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) if (lambda_specs.locations[ds_constexpr]) { - if (cxx_dialect >= cxx1z) + if (cxx_dialect >= cxx17) return_type_specs.locations[ds_constexpr] = lambda_specs.locations[ds_constexpr]; else error_at (lambda_specs.locations[ds_constexpr], "% " - "lambda only available with -std=c++1z or -std=gnu++1z"); + "lambda only available with -std=c++17 or -std=gnu++17"); } p = obstack_alloc (&declarator_obstack, 0); @@ -11284,9 +11284,9 @@ cp_parser_selection_statement (cp_parser* parser, bool *if_p, { cx = true; cp_token *tok = cp_lexer_consume_token (parser->lexer); - if (cxx_dialect < cxx1z && !in_system_header_at (tok->location)) + if (cxx_dialect < cxx17 && !in_system_header_at (tok->location)) pedwarn (tok->location, 0, "% only available " - "with -std=c++1z or -std=gnu++1z"); + "with -std=c++17 or -std=gnu++17"); } /* Look for the `('. */ @@ -11310,10 +11310,10 @@ cp_parser_selection_statement (cp_parser* parser, bool *if_p, if (cp_parser_init_statement_p (parser)) { tree decl; - if (cxx_dialect < cxx1z) + if (cxx_dialect < cxx17) pedwarn (cp_lexer_peek_token (parser->lexer)->location, 0, "init-statement in selection statements only available " - "with -std=c++1z or -std=gnu++1z"); + "with -std=c++17 or -std=gnu++17"); cp_parser_init_statement (parser, &decl); } @@ -11884,7 +11884,7 @@ cp_convert_range_for (tree statement, tree range_decl, tree range_expr, /*is_constant_init*/false, NULL_TREE, LOOKUP_ONLYCONVERTING); - if (cxx_dialect >= cxx1z) + if (cxx_dialect >= cxx17) iter_type = cv_unqualified (TREE_TYPE (end_expr)); end = build_decl (input_location, VAR_DECL, get_identifier ("__for_end"), iter_type); @@ -12024,7 +12024,7 @@ cp_parser_perform_range_for_lookup (tree range, tree *begin, tree *end) be the same, as required by the multiple auto declaration. */ if (!same_type_p (iter_type, cv_unqualified (TREE_TYPE (*end)))) { - if (cxx_dialect >= cxx1z + if (cxx_dialect >= cxx17 && (build_x_binary_op (input_location, NE_EXPR, *begin, ERROR_MARK, *end, ERROR_MARK, @@ -13178,9 +13178,9 @@ cp_parser_decomposition_declaration (cp_parser *parser, } } - if (cxx_dialect < cxx1z) + if (cxx_dialect < cxx17) pedwarn (loc, 0, "structured bindings only available with " - "-std=c++1z or -std=gnu++1z"); + "-std=c++17 or -std=gnu++17"); tree pushed_scope; cp_declarator *declarator = make_declarator (cdk_decomp); @@ -13771,7 +13771,7 @@ cp_parser_linkage_specification (cp_parser* parser) static_assert-declaration: static_assert ( constant-expression , string-literal ) ; - static_assert ( constant-expression ) ; (C++1Z) + static_assert ( constant-expression ) ; (C++17) If MEMBER_P, this static_assert is a class member. */ @@ -13812,10 +13812,10 @@ cp_parser_static_assert(cp_parser *parser, bool member_p) if (cp_lexer_peek_token (parser->lexer)->type == CPP_CLOSE_PAREN) { - if (cxx_dialect < cxx1z) + if (cxx_dialect < cxx17) pedwarn (input_location, OPT_Wpedantic, "static_assert without a message " - "only available with -std=c++1z or -std=gnu++1z"); + "only available with -std=c++17 or -std=gnu++17"); /* Eat the ')' */ cp_lexer_consume_token (parser->lexer); message = build_string (1, ""); @@ -17040,7 +17040,7 @@ cp_parser_simple_type_specifier (cp_parser* parser, /* Don't gobble tokens or issue error messages if this is an optional type-specifier. */ - if ((flags & CP_PARSER_FLAGS_OPTIONAL) || cxx_dialect >= cxx1z) + if ((flags & CP_PARSER_FLAGS_OPTIONAL) || cxx_dialect >= cxx17) cp_parser_parse_tentatively (parser); token = cp_lexer_peek_token (parser->lexer); @@ -17088,10 +17088,10 @@ cp_parser_simple_type_specifier (cp_parser* parser, && identifier_p (DECL_NAME (type))) maybe_note_name_used_in_class (DECL_NAME (type), type); /* If it didn't work out, we don't have a TYPE. */ - if (((flags & CP_PARSER_FLAGS_OPTIONAL) || cxx_dialect >= cxx1z) + if (((flags & CP_PARSER_FLAGS_OPTIONAL) || cxx_dialect >= cxx17) && !cp_parser_parse_definitely (parser)) type = NULL_TREE; - if (!type && cxx_dialect >= cxx1z) + if (!type && cxx_dialect >= cxx17) { if (flags & CP_PARSER_FLAGS_OPTIONAL) cp_parser_parse_tentatively (parser); @@ -18425,10 +18425,10 @@ cp_parser_namespace_definition (cp_parser* parser) if (cp_lexer_next_token_is_not (parser->lexer, CPP_SCOPE)) break; - if (!nested_definition_count && cxx_dialect < cxx1z) + if (!nested_definition_count && cxx_dialect < cxx17) pedwarn (input_location, OPT_Wpedantic, "nested namespace definitions only available with " - "-std=c++1z or -std=gnu++1z"); + "-std=c++17 or -std=gnu++17"); /* Nested namespace names can create new namespaces (unlike other qualified-ids). */ @@ -18657,11 +18657,11 @@ cp_parser_using_declaration (cp_parser* parser, else if (cp_lexer_next_token_is (parser->lexer, CPP_ELLIPSIS)) { cp_token *ell = cp_lexer_consume_token (parser->lexer); - if (cxx_dialect < cxx1z + if (cxx_dialect < cxx17 && !in_system_header_at (ell->location)) pedwarn (ell->location, 0, "pack expansion in using-declaration only available " - "with -std=c++1z or -std=gnu++1z"); + "with -std=c++17 or -std=gnu++17"); qscope = make_pack_expansion (qscope); } @@ -18720,10 +18720,10 @@ cp_parser_using_declaration (cp_parser* parser, && cp_lexer_next_token_is (parser->lexer, CPP_COMMA)) { cp_token *comma = cp_lexer_consume_token (parser->lexer); - if (cxx_dialect < cxx1z) + if (cxx_dialect < cxx17) pedwarn (comma->location, 0, "comma-separated list in using-declaration only available " - "with -std=c++1z or -std=gnu++1z"); + "with -std=c++17 or -std=gnu++17"); goto again; } @@ -19317,7 +19317,7 @@ cp_parser_init_declarator (cp_parser* parser, /* Handle C++17 deduction guides. */ if (!decl_specifiers->type && ctor_dtor_or_conv_p <= 0 - && cxx_dialect >= cxx1z) + && cxx_dialect >= cxx17) { cp_declarator *id = get_id_declarator (declarator); tree name = id->u.id.unqualified_name; @@ -23085,12 +23085,12 @@ cp_parser_type_parameter_key (cp_parser* parser) if ((tag_type = cp_parser_token_is_type_parameter_key (token)) != none_type) { cp_lexer_consume_token (parser->lexer); - if (pedantic && tag_type == typename_type && cxx_dialect < cxx1z) + if (pedantic && tag_type == typename_type && cxx_dialect < cxx17) /* typename is not allowed in a template template parameter - by the standard until C++1Z. */ + by the standard until C++17. */ pedwarn (token->location, OPT_Wpedantic, "ISO C++ forbids typename key in template template parameter;" - " use -std=c++1z or -std=gnu++1z"); + " use -std=c++17 or -std=gnu++17"); } else cp_parser_error (parser, "expected % or %"); @@ -24122,9 +24122,9 @@ cp_parser_exception_specification_opt (cp_parser* parser) /* Restore the saved message. */ parser->type_definition_forbidden_message = saved_message; - if (cxx_dialect >= cxx1z) + if (cxx_dialect >= cxx17) { - error_at (loc, "ISO C++1z does not allow dynamic exception " + error_at (loc, "ISO C++17 does not allow dynamic exception " "specifications"); type_id_list = NULL_TREE; } @@ -24136,7 +24136,7 @@ cp_parser_exception_specification_opt (cp_parser* parser) /* In C++17, throw() is equivalent to noexcept (true). throw() is deprecated in C++11 and above as well, but is still widely used, so don't warn about it yet. */ - else if (cxx_dialect >= cxx1z) + else if (cxx_dialect >= cxx17) type_id_list = noexcept_true_spec; else type_id_list = empty_except_spec; @@ -25133,11 +25133,11 @@ cp_parser_std_attribute_spec (cp_parser *parser) if (attr_ns && cp_lexer_nth_token_is (parser->lexer, 3, CPP_COLON)) { - if (cxx_dialect < cxx1z + if (cxx_dialect < cxx17 && !in_system_header_at (input_location)) pedwarn (input_location, 0, "attribute using prefix only available " - "with -std=c++1z or -std=gnu++1z"); + "with -std=c++17 or -std=gnu++17"); cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer); @@ -26197,7 +26197,7 @@ cp_parser_constructor_declarator_p (cp_parser *parser, bool friend_p) nested-name-specifier. Except in C++17 mode, where we might be declaring a guiding declaration. */ if (!nested_name_specifier && outside_class_specifier_p - && cxx_dialect < cxx1z) + && cxx_dialect < cxx17) constructor_p = false; else if (nested_name_specifier == error_mark_node) constructor_p = false; @@ -26228,7 +26228,7 @@ cp_parser_constructor_declarator_p (cp_parser *parser, bool friend_p) }; we must recognize that the nested `S' names a class. */ - if (cxx_dialect >= cxx1z) + if (cxx_dialect >= cxx17) cp_parser_parse_tentatively (parser); tree type_decl; @@ -26240,7 +26240,7 @@ cp_parser_constructor_declarator_p (cp_parser *parser, bool friend_p) /*class_head_p=*/false, /*is_declaration=*/false); - if (cxx_dialect >= cxx1z + if (cxx_dialect >= cxx17 && !cp_parser_parse_definitely (parser)) { type_decl = NULL_TREE; diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index ec7bbc890c6..f12ab2605d8 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -4551,7 +4551,7 @@ mark_template_parm (tree t, void* data) } /* In C++17 the type of a non-type argument is a deduced context. */ - if (cxx_dialect >= cxx1z + if (cxx_dialect >= cxx17 && TREE_CODE (t) == TEMPLATE_PARM_INDEX) for_each_template_parm (TREE_TYPE (t), &mark_template_parm, @@ -6475,7 +6475,7 @@ convert_nontype_argument (tree type, tree expr, tsubst_flags_t complain) to leave it in that form rather than lower it to a CONSTRUCTOR. */; else if (INTEGRAL_OR_ENUMERATION_TYPE_P (type) - || cxx_dialect >= cxx1z) + || cxx_dialect >= cxx17) { /* C++17: A template-argument for a non-type template-parameter shall be a converted constant expression (8.20) of the type of the @@ -6663,7 +6663,7 @@ convert_nontype_argument (tree type, tree expr, tsubst_flags_t complain) orig_expr, type, decl); return NULL_TREE; } - else if ((cxx_dialect >= cxx11 && cxx_dialect < cxx1z) + else if ((cxx_dialect >= cxx11 && cxx_dialect < cxx17) && decl_linkage (decl) == lk_none) { if (complain & tf_error) @@ -10817,7 +10817,7 @@ instantiate_class_template_1 (tree type) tree decl = lambda_function (type); if (decl) { - if (cxx_dialect >= cxx1z) + if (cxx_dialect >= cxx17) CLASSTYPE_LITERAL_P (type) = true; if (!DECL_TEMPLATE_INFO (decl) @@ -19543,7 +19543,7 @@ type_unification_real (tree tparms, tsubst_flags_t complain = (explain_p ? tf_warning_or_error : tf_none); - bool tried_array_deduction = (cxx_dialect < cxx1z); + bool tried_array_deduction = (cxx_dialect < cxx17); for (i = 0; i < ntparms; i++) { @@ -20918,7 +20918,7 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict, else if (uses_template_parms (tparm)) { /* We haven't deduced the type of this parameter yet. */ - if (cxx_dialect >= cxx1z + if (cxx_dialect >= cxx17 /* We deduce from array bounds in try_array_deduction. */ && !(strict & UNIFY_ALLOW_INTEGER)) { @@ -21890,7 +21890,7 @@ get_partial_spec_bindings (tree tmpl, tree spec_tmpl, tree args) else deduced_args = innermost_deduced_args; - bool tried_array_deduction = (cxx_dialect < cxx1z); + bool tried_array_deduction = (cxx_dialect < cxx17); again: if (unify (tparms, deduced_args, INNERMOST_TEMPLATE_ARGS (spec_args), @@ -23707,7 +23707,7 @@ dependent_type_p_r (tree type) arg_type = TREE_CHAIN (arg_type)) if (dependent_type_p (TREE_VALUE (arg_type))) return true; - if (cxx_dialect >= cxx1z) + if (cxx_dialect >= cxx17) { /* A value-dependent noexcept-specifier makes the type dependent. */ tree spec = TYPE_RAISES_EXCEPTIONS (type); diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 0a09998aa21..aa5d1288a5a 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -6177,11 +6177,11 @@ cp_build_unary_op (enum tree_code code, tree xarg, bool noconvert, } else { - if (cxx_dialect >= cxx1z) + if (cxx_dialect >= cxx17) { if (complain & tf_error) error ("use of an operand of type %qT in " - "% is forbidden in C++1z", + "% is forbidden in C++17", boolean_type_node); return error_mark_node; } diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index e9aca395911..82e18ecb178 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -1364,7 +1364,7 @@ process_init_constructor_record (tree type, tree init, gcc_assert (TREE_CODE (type) == RECORD_TYPE); gcc_assert (!CLASSTYPE_VBASECLASSES (type)); gcc_assert (!TYPE_BINFO (type) - || cxx_dialect >= cxx1z + || cxx_dialect >= cxx17 || !BINFO_N_BASE_BINFOS (TYPE_BINFO (type))); gcc_assert (!TYPE_POLYMORPHIC_P (type)); @@ -1384,7 +1384,7 @@ process_init_constructor_record (tree type, tree init, if (TREE_CODE (field) != FIELD_DECL || (DECL_ARTIFICIAL (field) - && !(cxx_dialect >= cxx1z && DECL_FIELD_IS_BASE (field)))) + && !(cxx_dialect >= cxx17 && DECL_FIELD_IS_BASE (field)))) continue; /* If this is a bitfield, first convert to the declared type. */ diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi index 6e16ffb0e65..8e9cba378c3 100644 --- a/gcc/doc/cpp.texi +++ b/gcc/doc/cpp.texi @@ -1877,9 +1877,7 @@ selected, the value of the macro is @code{199711L} for the 1998 C++ standard, @code{201103L} for the 2011 C++ standard, @code{201402L} for the 2014 C++ standard, -or an unspecified value strictly larger than @code{201402L} for the -experimental languages enabled by @option{-std=c++1z} and -@option{-std=gnu++1z}. +@code{201703L} for the 2017 C++ standard. @item __OBJC__ This macro is defined, with value 1, when the Objective-C compiler is in diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index e4cacf26bdb..a727d952fd2 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1870,15 +1870,15 @@ GNU dialect of @option{-std=c++14}. This is the default for C++ code. The name @samp{gnu++1y} is deprecated. -@item c++1z -The next revision of the ISO C++ standard, tentatively planned for -2017. Support is highly experimental, and will almost certainly -change in incompatible ways in future releases. - -@item gnu++1z -GNU dialect of @option{-std=c++1z}. Support is highly experimental, -and will almost certainly change in incompatible ways in future -releases. +@item c++17 +@itemx c++1z +The 2017 ISO C++ standard plus amendments. +The name @samp{c++1z} is deprecated. + +@item gnu++17 +@itemx gnu++1z +GNU dialect of @option{-std=c++17}. +The name @samp{gnu++1z} is deprecated. @end table @item -fgnu89-inline @@ -2304,7 +2304,7 @@ specify how much alignment (in bytes) is provided by that function, but few users will need to override the default of @code{alignof(std::max_align_t)}. -This flag is enabled by default for @option{-std=c++1z}. +This flag is enabled by default for @option{-std=c++17}. @item -fcheck-new @opindex fcheck-new @@ -2479,7 +2479,7 @@ Enable the P0522 resolution to Core issue 150, template template parameters and default arguments: this allows a template with default template arguments as an argument for a template template parameter with fewer template parameters. This flag is enabled by default for -@option{-std=c++1z}. +@option{-std=c++17}. @item -fno-nonansi-builtins @opindex fno-nonansi-builtins @@ -2573,10 +2573,10 @@ cast to convert an arbitrary integer value to the enumerated type. @opindex fstrong-eval-order Evaluate member access, array subscripting, and shift expressions in left-to-right order, and evaluate assignment in right-to-left order, -as adopted for C++17. Enabled by default with @option{-std=c++1z}. +as adopted for C++17. Enabled by default with @option{-std=c++17}. @option{-fstrong-eval-order=some} enables just the ordering of member access and shift expressions, and is the default without -@option{-std=c++1z}. +@option{-std=c++17}. @item -ftemplate-backtrace-limit=@var{n} @opindex ftemplate-backtrace-limit @@ -2913,14 +2913,14 @@ the compiler to never throw an exception. @item -Wnoexcept-type @r{(C++ and Objective-C++ only)} @opindex Wnoexcept-type @opindex Wno-noexcept-type -Warn if the C++1z feature making @code{noexcept} part of a function +Warn if the C++17 feature making @code{noexcept} part of a function type changes the mangled name of a symbol relative to C++14. Enabled -by @option{-Wabi} and @option{-Wc++1z-compat}. +by @option{-Wabi} and @option{-Wc++17-compat}. @smallexample template void f(T t) @{ t(); @}; void g() noexcept; -void h() @{ f(g); @} // in C++14 calls f, in C++1z calls f +void h() @{ f(g); @} // in C++14 calls f, in C++17 calls f @end smallexample @item -Wclass-memaccess @r{(C++ and Objective-C++ only)} @@ -2957,7 +2957,7 @@ Warn on uses of the @code{register} storage class specifier, except when it is part of the GNU @ref{Explicit Register Variables} extension. The use of the @code{register} keyword as storage class specifier has been deprecated in C++11 and removed in C++17. -Enabled by default with @option{-std=c++1z}. +Enabled by default with @option{-std=c++17}. @item -Wreorder @r{(C++ and Objective-C++ only)} @opindex Wreorder @@ -5391,7 +5391,7 @@ Warn about suspicious operations on expressions of a boolean type. For instance, bitwise negation of a boolean is very likely a bug in the program. For C, this warning also warns about incrementing or decrementing a boolean, which rarely makes sense. (In C++, decrementing a boolean is always invalid. -Incrementing a boolean is invalid in C++1z, and deprecated otherwise.) +Incrementing a boolean is invalid in C++17, and deprecated otherwise.) This warning is enabled by @option{-Wall}. @@ -5898,10 +5898,10 @@ enabled by @option{-Wall}. Warn about C++ constructs whose meaning differs between ISO C++ 2011 and ISO C++ 2014. This warning is enabled by @option{-Wall}. -@item -Wc++1z-compat @r{(C++ and Objective-C++ only)} -@opindex Wc++1z-compat +@item -Wc++17-compat @r{(C++ and Objective-C++ only)} +@opindex Wc++17-compat Warn about C++ constructs whose meaning differs between ISO C++ 2014 -and the forthoming ISO C++ 2017(?). This warning is enabled by @option{-Wall}. +and ISO C++ 2017. This warning is enabled by @option{-Wall}. @item -Wcast-qual @opindex Wcast-qual diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 6a4cd602795..1a4f1a2b12b 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -23395,6 +23395,8 @@ gen_producer_string (void) static const char * highest_c_language (const char *lang1, const char *lang2) { + if (strcmp ("GNU C++17", lang1) == 0 || strcmp ("GNU C++17", lang2) == 0) + return "GNU C++17"; if (strcmp ("GNU C++14", lang1) == 0 || strcmp ("GNU C++14", lang2) == 0) return "GNU C++14"; if (strcmp ("GNU C++11", lang1) == 0 || strcmp ("GNU C++11", lang2) == 0) @@ -23491,6 +23493,9 @@ gen_compile_unit_die (const char *filename) language = DW_LANG_C_plus_plus_11; else if (strcmp (language_string, "GNU C++14") == 0) language = DW_LANG_C_plus_plus_14; + else if (strcmp (language_string, "GNU C++17") == 0) + /* For now. */ + language = DW_LANG_C_plus_plus_14; } } else if (strcmp (language_string, "GNU F77") == 0) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index eadffc16861..e53e7be5d64 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,420 @@ 2017-09-15 Jakub Jelinek + * lib/g++-dg.exp (g++-dg-runtest): Use 17 instead of 1z. + * lib/target-supports.exp (check_effective_target_c++14): Use + check_effective_target_c++17 instead of check_effective_target_c++1z. + (check_effective_target_c++14_down): Likewise. + (check_effective_target_c++1z_only): Rename to ... + (check_effective_target_c++17_only): ... this. + (check_effective_target_c++1z): Rename to ... + (check_effective_target_c++17): ... this. + * g++.dg/debug/dwarf2/inline-var-1.C: Use -std=c++17 or -std=gnu++17 + instead of -std=c++1z or -std=gnu++1z. Use c++17 instead of c++1z + and c++17_only instead of c++1z_only. Adjust expected diagnostics + and comments refering to 1z to 17. + * g++.dg/debug/dwarf2/inline-var-2.C: Likewise. + * g++.dg/template/partial5.C: Likewise. + * g++.dg/template/nontype8.C: Likewise. + * g++.dg/cpp1z/noexcept-type5.C: Likewise. + * g++.dg/cpp1z/nontype3a.C: Likewise. + * g++.dg/cpp1z/constexpr-lambda4.C: Likewise. + * g++.dg/cpp1z/noexcept-type16.C: Likewise. + * g++.dg/cpp1z/class-deduction32.C: Likewise. + * g++.dg/cpp1z/pr78771.C: Likewise. + * g++.dg/cpp1z/elide1.C: Likewise. + * g++.dg/cpp1z/fold3.C: Likewise. + * g++.dg/cpp1z/class-deduction2.C: Likewise. + * g++.dg/cpp1z/noexcept-type12.C: Likewise. + * g++.dg/cpp1z/inline-var2.C: Likewise. + * g++.dg/cpp1z/eval-order2.C: Likewise. + * g++.dg/cpp1z/decomp21.C: Likewise. + * g++.dg/cpp1z/constexpr-lambda11.C: Likewise. + * g++.dg/cpp1z/constexpr-lambda9.C: Likewise. + * g++.dg/cpp1z/utf8-neg.C: Likewise. + * g++.dg/cpp1z/class-deduction41.C: Likewise. + * g++.dg/cpp1z/class-deduction23.C: Likewise. + * g++.dg/cpp1z/nodiscard3.C: Likewise. + * g++.dg/cpp1z/static_assert-nomsg.C: Likewise. + * g++.dg/cpp1z/noexcept-type9.C: Likewise. + * g++.dg/cpp1z/class-deduction21.C: Likewise. + * g++.dg/cpp1z/range-for1.C: Likewise. + * g++.dg/cpp1z/init-statement4.C: Likewise. + * g++.dg/cpp1z/udlit-utf8char.C: Likewise. + * g++.dg/cpp1z/decomp30.C: Likewise. + * g++.dg/cpp1z/class-deduction39.C: Likewise. + * g++.dg/cpp1z/register2.C: Likewise. + * g++.dg/cpp1z/decomp9.C: Likewise. + * g++.dg/cpp1z/regress1.C: Likewise. + * g++.dg/cpp1z/direct-enum-init1.C: Likewise. + * g++.dg/cpp1z/class-deduction30.C: Likewise. + * g++.dg/cpp1z/abbrev2.C: Likewise. + * g++.dg/cpp1z/nontype-auto6.C: Likewise. + * g++.dg/cpp1z/regress2.C: Likewise. + * g++.dg/cpp1z/decomp16.C: Likewise. + * g++.dg/cpp1z/bool-increment1.C: Likewise. + * g++.dg/cpp1z/aligned-new1.C: Likewise. + * g++.dg/cpp1z/decomp3.C: Likewise. + * g++.dg/cpp1z/register1.C: Likewise. + * g++.dg/cpp1z/namespace-attribs.C: Likewise. + * g++.dg/cpp1z/class-deduction1.C: Likewise. + * g++.dg/cpp1z/decomp10.C: Likewise. + * g++.dg/cpp1z/constexpr-if11.C: Likewise. + * g++.dg/cpp1z/constexpr-lambda10.C: Likewise. + * g++.dg/cpp1z/decomp27.C: Likewise. + * g++.dg/cpp1z/noexcept-type2.C: Likewise. + * g++.dg/cpp1z/constexpr-lambda6.C: Likewise. + * g++.dg/cpp1z/class-deduction9.C: Likewise. + * g++.dg/cpp1z/attributes-enum-1.C: Likewise. + * g++.dg/cpp1z/decomp11.C: Likewise. + * g++.dg/cpp1z/aligned-new3.C: Likewise. + * g++.dg/cpp1z/utf8-2.C: Likewise. + * g++.dg/cpp1z/lambda-this3.C: Likewise. + * g++.dg/cpp1z/decomp-constexpr1.C: Likewise. + * g++.dg/cpp1z/byte1.C: Likewise. + * g++.dg/cpp1z/nontype-auto9.C: Likewise. + * g++.dg/cpp1z/aggr-base4.C: Likewise. + * g++.dg/cpp1z/constexpr-lambda1.C: Likewise. + * g++.dg/cpp1z/nontype-auto3.C: Likewise. + * g++.dg/cpp1z/utf8-2a.C: Likewise. + * g++.dg/cpp1z/constexpr-lambda7.C: Likewise. + * g++.dg/cpp1z/aggr-base6.C: Likewise. + * g++.dg/cpp1z/cplusplus.C: Likewise. + * g++.dg/cpp1z/class-deduction20.C: Likewise. + * g++.dg/cpp1z/aggr-base2.C: Likewise. + * g++.dg/cpp1z/class-deduction6.C: Likewise. + * g++.dg/cpp1z/noexcept-type3.C: Likewise. + * g++.dg/cpp1z/class-deduction31.C: Likewise. + * g++.dg/cpp1z/class-deduction25.C: Likewise. + * g++.dg/cpp1z/class-deduction18.C: Likewise. + * g++.dg/cpp1z/fold9.C: Likewise. + * g++.dg/cpp1z/noexcept-type8.C: Likewise. + * g++.dg/cpp1z/abbrev1.C: Likewise. + * g++.dg/cpp1z/constexpr-if10.C: Likewise. + * g++.dg/cpp1z/utf8.C: Likewise. + * g++.dg/cpp1z/noexcept-type7.C: Likewise. + * g++.dg/cpp1z/aggr-base3.C: Likewise. + * g++.dg/cpp1z/constexpr-lambda8.C: Likewise. + * g++.dg/cpp1z/init-statement2.C: Likewise. + * g++.dg/cpp1z/nontype-auto4.C: Likewise. + * g++.dg/cpp1z/constexpr-if12.C: Likewise. + * g++.dg/cpp1z/class-deduction40.C: Likewise. + * g++.dg/cpp1z/nontype3.C: Likewise. + * g++.dg/cpp1z/class-deduction14.C: Likewise. + * g++.dg/cpp1z/fold7.C: Likewise. + * g++.dg/cpp1z/nontype2.C: Likewise. + * g++.dg/cpp1z/class-deduction15.C: Likewise. + * g++.dg/cpp1z/nested-namespace-def1.C: Likewise. + * g++.dg/cpp1z/class-deduction13.C: Likewise. + * g++.dg/cpp1z/aligned-new7.C: Likewise. + * g++.dg/cpp1z/noexcept-type1.C: Likewise. + * g++.dg/cpp1z/nontype1.C: Likewise. + * g++.dg/cpp1z/init-statement5.C: Likewise. + * g++.dg/cpp1z/nontype-auto2.C: Likewise. + * g++.dg/cpp1z/decomp17.C: Likewise. + * g++.dg/cpp1z/fold4.C: Likewise. + * g++.dg/cpp1z/constexpr-lambda2.C: Likewise. + * g++.dg/cpp1z/fold7a.C: Likewise. + * g++.dg/cpp1z/nontype-auto5.C: Likewise. + * g++.dg/cpp1z/init-statement7.C: Likewise. + * g++.dg/cpp1z/aggr-base5.C: Likewise. + * g++.dg/cpp1z/constexpr-lambda5.C: Likewise. + * g++.dg/cpp1z/pr79143.C: Likewise. + * g++.dg/cpp1z/class-deduction38.C: Likewise. + * g++.dg/cpp1z/nontype-auto8.C: Likewise. + * g++.dg/cpp1z/class-deduction12.C: Likewise. + * g++.dg/cpp1z/decomp20.C: Likewise. + * g++.dg/cpp1z/class-deduction22.C: Likewise. + * g++.dg/cpp1z/class-deduction29.C: Likewise. + * g++.dg/cpp1z/class-deduction8.C: Likewise. + * g++.dg/cpp1z/class-deduction43.C: Likewise. + * g++.dg/cpp1z/feat-cxx1z.C: Likewise. + * g++.dg/cpp1z/fold8.C: Likewise. + * g++.dg/cpp1z/init-statement3.C: Likewise. + * g++.dg/cpp1z/nontype-auto10.C: Likewise. + * g++.dg/cpp1z/class-deduction36.C: Likewise. + * g++.dg/cpp1z/noexcept-type17.C: Likewise. + * g++.dg/cpp1z/fallthrough1.C: Likewise. + * g++.dg/cpp1z/fold1.C: Likewise. + * g++.dg/cpp1z/class-deduction26.C: Likewise. + * g++.dg/cpp1z/fold-ice1.C: Likewise. + * g++.dg/cpp1z/fold5.C: Likewise. + * g++.dg/cpp1z/class-deduction34.C: Likewise. + * g++.dg/cpp1z/noexcept-type6.C: Likewise. + * g++.dg/cpp1z/class-deduction7.C: Likewise. + * g++.dg/cpp1z/class-deduction16.C: Likewise. + * g++.dg/cpp1z/class-deduction10.C: Likewise. + * g++.dg/cpp1z/eval-order3.C: Likewise. + * g++.dg/cpp1z/constexpr-lambda13.C: Likewise. + * g++.dg/cpp1z/aggr-base2a.C: Likewise. + * g++.dg/cpp1z/nontype-auto1.C: Likewise. + * g++.dg/cpp1z/constexpr-lambda3.C: Likewise. + * g++.dg/cpp1z/nontype-auto7.C: Likewise. + * g++.dg/cpp1z/decomp15.C: Likewise. + * g++.dg/cpp1z/noexcept-type4.C: Likewise. + * g++.dg/cpp1z/fold-mangle.C: Likewise. + * g++.dg/cpp1z/class-deduction35.C: Likewise. + * g++.dg/cpp1z/decomp4.C: Likewise. + * g++.dg/cpp1z/class-deduction42.C: Likewise. + * g++.dg/cpp1z/init-statement8.C: Likewise. + * g++.dg/cpp1z/inline-var1a.C: Likewise. + * g++.dg/cpp1z/init-statement6.C: Likewise. + * g++.dg/cpp1z/class-deduction17.C: Likewise. + * g++.dg/cpp1z/class-deduction28.C: Likewise. + * g++.dg/cpp1z/class-deduction27.C: Likewise. + * g++.dg/cpp1z/decomp-bitfield1.C: Likewise. + * g++.dg/cpp1z/attributes-enum-1a.C: Likewise. + * g++.dg/cpp1z/class-deduction11.C: Likewise. + * g++.dg/cpp1z/constexpr-lambda12.C: Likewise. + * g++.dg/cpp1z/init-statement9.C: Likewise. + * g++.dg/cpp1z/class-deduction19.C: Likewise. + * g++.dg/cpp1z/class-deduction5.C: Likewise. + * g++.dg/cpp1z/fold2.C: Likewise. + * g++.dg/cpp1z/class-deduction33.C: Likewise. + * g++.dg/cpp1z/class-deduction24.C: Likewise. + * g++.dg/cpp1z/aggr-base1.C: Likewise. + * g++.dg/cpp1z/fold6.C: Likewise. + * g++.dg/cpp1z/decomp12.C: Likewise. + * g++.dg/cpp1z/class-deduction4.C: Likewise. + * g++.dg/cpp1z/inline-var1.C: Likewise. + * g++.dg/cpp1z/aligned-new2.C: Likewise. + * g++.dg/cpp1z/class-deduction3.C: Likewise. + * g++.dg/other/error3.C: Likewise. + * g++.dg/init/new25.C: Likewise. + * g++.dg/init/new13.C: Likewise. + * g++.dg/tls/diag-2.C: Likewise. + * g++.dg/tls/diag-4.C: Likewise. + * g++.dg/opt/noreturn-1.C: Likewise. + * g++.dg/eh/async-unwind2.C: Likewise. + * g++.dg/eh/spec9.C: Likewise. + * g++.dg/eh/spec7.C: Likewise. + * g++.dg/eh/template1.C: Likewise. + * g++.dg/eh/cond4.C: Likewise. + * g++.dg/eh/pr41819.C: Likewise. + * g++.dg/eh/delete1.C: Likewise. + * g++.dg/eh/spec3.C: Likewise. + * g++.dg/eh/forced4.C: Likewise. + * g++.dg/eh/spec2.C: Likewise. + * g++.dg/eh/shadow1.C: Likewise. + * g++.dg/eh/pr38662.C: Likewise. + * g++.dg/eh/ehopt1.C: Likewise. + * g++.dg/eh/spec8.C: Likewise. + * g++.dg/eh/init-temp2.C: Likewise. + * g++.dg/rtti/crash3.C: Likewise. + * g++.dg/warn/Wreturn-type-3.C: Likewise. + * g++.dg/warn/register-parm-1.C: Likewise. + * g++.dg/warn/register-var-2.C: Likewise. + * g++.dg/gcov/gcov-7.C: Likewise. + * g++.dg/tree-ssa/pr45605.C: Likewise. + * g++.dg/cpp/pr23827_cxx98_neg.C: Likewise. + * g++.dg/lookup/exception1.C: Likewise. + * g++.dg/ubsan/pr79589.C: Likewise. + * g++.dg/tm/pr47340.C: Likewise. + * g++.dg/tm/pr46567.C: Likewise. + * g++.dg/expr/bitfield5.C: Likewise. + * g++.dg/expr/bool1.C: Likewise. + * g++.dg/expr/lval3.C: Likewise. + * g++.dg/expr/lval4.C: Likewise. + * g++.dg/expr/bitfield4.C: Likewise. + * g++.dg/expr/bitfield6.C: Likewise. + * g++.dg/expr/bool3.C: Likewise. + * g++.dg/ext/has_nothrow_constructor.C: Likewise. + * g++.dg/ext/has_nothrow_copy-7.C: Likewise. + * g++.dg/ext/has_nothrow_copy-1.C: Likewise. + * g++.dg/ext/has_nothrow_copy-2.C: Likewise. + * g++.dg/ext/has_nothrow_copy-4.C: Likewise. + * g++.dg/ext/has_nothrow_copy-5.C: Likewise. + * g++.dg/ext/has_nothrow_copy-6.C: Likewise. + * g++.dg/ext/has_nothrow_assign.C: Likewise. + * g++.dg/parse/register1.C: Likewise. + * g++.dg/parse/error15.C: Likewise. + * g++.dg/parse/linkage2.C: Likewise. + * g++.dg/concepts/intro2.C: Likewise. + * g++.dg/concepts/class.C: Likewise. + * g++.dg/concepts/traits1.C: Likewise. + * g++.dg/concepts/req5.C: Likewise. + * g++.dg/concepts/var-concept5.C: Likewise. + * g++.dg/concepts/fn-concept2.C: Likewise. + * g++.dg/concepts/traits2.C: Likewise. + * g++.dg/concepts/placeholder2.C: Likewise. + * g++.dg/concepts/class6.C: Likewise. + * g++.dg/concepts/memtmpl1.C: Likewise. + * g++.dg/concepts/friend2.C: Likewise. + * g++.dg/concepts/template-parm3.C: Likewise. + * g++.dg/concepts/template-parm10.C: Likewise. + * g++.dg/concepts/explicit-spec1.C: Likewise. + * g++.dg/concepts/explicit-spec3.C: Likewise. + * g++.dg/concepts/var-templ2.C: Likewise. + * g++.dg/concepts/intro5.C: Likewise. + * g++.dg/concepts/deduction-constraint1.C: Likewise. + * g++.dg/concepts/iconv1.C: Likewise. + * g++.dg/concepts/constrained-parm.C: Likewise. + * g++.dg/concepts/template-template-parm1.C: Likewise. + * g++.dg/concepts/var-concept3.C: Likewise. + * g++.dg/concepts/class3.C: Likewise. + * g++.dg/concepts/memfun2.C: Likewise. + * g++.dg/concepts/req1.C: Likewise. + * g++.dg/concepts/disjunction1.C: Likewise. + * g++.dg/concepts/req17.C: Likewise. + * g++.dg/concepts/pr65848.C: Likewise. + * g++.dg/concepts/placeholder4.C: Likewise. + * g++.dg/concepts/decl-diagnose.C: Likewise. + * g++.dg/concepts/intro7.C: Likewise. + * g++.dg/concepts/pr68683.C: Likewise. + * g++.dg/concepts/partial-spec4.C: Likewise. + * g++.dg/concepts/template-parm5.C: Likewise. + * g++.dg/concepts/explicit-inst1.C: Likewise. + * g++.dg/concepts/class-deduction1.C: Likewise. + * g++.dg/concepts/class1.C: Likewise. + * g++.dg/concepts/req15.C: Likewise. + * g++.dg/concepts/memfun.C: Likewise. + * g++.dg/concepts/pr68434.C: Likewise. + * g++.dg/concepts/inherit-ctor4.C: Likewise. + * g++.dg/concepts/partial-spec6.C: Likewise. + * g++.dg/concepts/var-templ1.C: Likewise. + * g++.dg/concepts/template-parm8.C: Likewise. + * g++.dg/concepts/explicit-inst3.C: Likewise. + * g++.dg/concepts/class4.C: Likewise. + * g++.dg/concepts/req6.C: Likewise. + * g++.dg/concepts/fn8.C: Likewise. + * g++.dg/concepts/class5.C: Likewise. + * g++.dg/concepts/placeholder5.C: Likewise. + * g++.dg/concepts/req16.C: Likewise. + * g++.dg/concepts/req10.C: Likewise. + * g++.dg/concepts/var-concept2.C: Likewise. + * g++.dg/concepts/auto3.C: Likewise. + * g++.dg/concepts/generic-fn-err.C: Likewise. + * g++.dg/concepts/pr65552.C: Likewise. + * g++.dg/concepts/partial-concept-id2.C: Likewise. + * g++.dg/concepts/fn1.C: Likewise. + * g++.dg/concepts/partial-spec.C: Likewise. + * g++.dg/concepts/template-parm12.C: Likewise. + * g++.dg/concepts/diagnostic1.C: Likewise. + * g++.dg/concepts/intro1.C: Likewise. + * g++.dg/concepts/explicit-inst4.C: Likewise. + * g++.dg/concepts/req18.C: Likewise. + * g++.dg/concepts/explicit-spec5.C: Likewise. + * g++.dg/concepts/var-concept6.C: Likewise. + * g++.dg/concepts/fn9.C: Likewise. + * g++.dg/concepts/req2.C: Likewise. + * g++.dg/concepts/template-parm7.C: Likewise. + * g++.dg/concepts/req14.C: Likewise. + * g++.dg/concepts/template-parm6.C: Likewise. + * g++.dg/concepts/variadic4.C: Likewise. + * g++.dg/concepts/fn6.C: Likewise. + * g++.dg/concepts/req-neg1.C: Likewise. + * g++.dg/concepts/alias3.C: Likewise. + * g++.dg/concepts/expression2.C: Likewise. + * g++.dg/concepts/partial-spec3.C: Likewise. + * g++.dg/concepts/expression3.C: Likewise. + * g++.dg/concepts/memfun-err.C: Likewise. + * g++.dg/concepts/pr66091.C: Likewise. + * g++.dg/concepts/explicit-spec2.C: Likewise. + * g++.dg/concepts/equiv.C: Likewise. + * g++.dg/concepts/friend1.C: Likewise. + * g++.dg/concepts/fn4.C: Likewise. + * g++.dg/concepts/var-templ3.C: Likewise. + * g++.dg/concepts/explicit-inst2.C: Likewise. + * g++.dg/concepts/alias2.C: Likewise. + * g++.dg/concepts/regress/alias-decl-42.C: Likewise. + * g++.dg/concepts/placeholder6.C: Likewise. + * g++.dg/concepts/fn10.C: Likewise. + * g++.dg/concepts/req3.C: Likewise. + * g++.dg/concepts/variadic2.C: Likewise. + * g++.dg/concepts/pr65636.C: Likewise. + * g++.dg/concepts/intro6.C: Likewise. + * g++.dg/concepts/class2.C: Likewise. + * g++.dg/concepts/fn2.C: Likewise. + * g++.dg/concepts/req20.C: Likewise. + * g++.dg/concepts/req8.C: Likewise. + * g++.dg/concepts/placeholder1.C: Likewise. + * g++.dg/concepts/pr65854.C: Likewise. + * g++.dg/concepts/member-concept.C: Likewise. + * g++.dg/concepts/template-parm2.C: Likewise. + * g++.dg/concepts/variadic1.C: Likewise. + * g++.dg/concepts/fn7.C: Likewise. + * g++.dg/concepts/intro4.C: Likewise. + * g++.dg/concepts/req13.C: Likewise. + * g++.dg/concepts/inherit-ctor3.C: Likewise. + * g++.dg/concepts/explicit-spec6.C: Likewise. + * g++.dg/concepts/auto1.C: Likewise. + * g++.dg/concepts/alias1.C: Likewise. + * g++.dg/concepts/fn-concept1.C: Likewise. + * g++.dg/concepts/template-parm11.C: Likewise. + * g++.dg/concepts/explicit-spec4.C: Likewise. + * g++.dg/concepts/partial-concept-id1.C: Likewise. + * g++.dg/concepts/req9.C: Likewise. + * g++.dg/concepts/req4.C: Likewise. + * g++.dg/concepts/pr65681.C: Likewise. + * g++.dg/concepts/req7.C: Likewise. + * g++.dg/concepts/req12.C: Likewise. + * g++.dg/concepts/fn5.C: Likewise. + * g++.dg/concepts/alias4.C: Likewise. + * g++.dg/concepts/generic-fn.C: Likewise. + * g++.dg/concepts/feature-macro.C: Likewise. + * g++.dg/concepts/req19.C: Likewise. + * g++.dg/concepts/placeholder3.C: Likewise. + * g++.dg/concepts/intro3.C: Likewise. + * g++.dg/concepts/partial-spec5.C: Likewise. + * g++.dg/concepts/template-parm4.C: Likewise. + * g++.dg/concepts/dr1430.C: Likewise. + * g++.dg/concepts/pr65634.C: Likewise. + * g++.dg/concepts/var-concept4.C: Likewise. + * g++.dg/concepts/pr67249.C: Likewise. + * g++.dg/concepts/expression.C: Likewise. + * g++.dg/concepts/pr65575.C: Likewise. + * g++.dg/concepts/partial-spec2.C: Likewise. + * g++.dg/concepts/template-parm9.C: Likewise. + * g++.dg/concepts/inherit-ctor1.C: Likewise. + * g++.dg/concepts/equiv2.C: Likewise. + * g++.dg/concepts/req11.C: Likewise. + * g++.dg/concepts/template-parm1.C: Likewise. + * g++.dg/concepts/inherit-ctor2.C: Likewise. + * g++.dg/concepts/var-concept1.C: Likewise. + * g++.dg/concepts/fn3.C: Likewise. + * g++.dg/torture/pr46364.C: Likewise. + * g++.dg/torture/stackalign/eh-alloca-1.C: Likewise. + * g++.dg/torture/stackalign/eh-fastcall-1.C: Likewise. + * g++.dg/torture/stackalign/eh-vararg-1.C: Likewise. + * g++.dg/torture/stackalign/eh-vararg-2.C: Likewise. + * g++.dg/torture/stackalign/eh-global-1.C: Likewise. + * g++.dg/torture/stackalign/eh-thiscall-1.C: Likewise. + * g++.dg/torture/stackalign/eh-inline-2.C: Likewise. + * g++.dg/torture/stackalign/eh-inline-1.C: Likewise. + * g++.dg/torture/pr52918-1.C: Likewise. + * g++.dg/torture/pr49394.C: Likewise. + * g++.dg/torture/pr57190.C: Likewise. + * g++.dg/cpp0x/static_assert8.C: Likewise. + * g++.dg/cpp0x/noexcept19.C: Likewise. + * g++.dg/cpp0x/variadic-throw.C: Likewise. + * g++.dg/cpp0x/variadic73.C: Likewise. + * g++.dg/cpp0x/noexcept02.C: Likewise. + * g++.dg/cpp0x/defaulted23.C: Likewise. + * g++.dg/cpp0x/noexcept08.C: Likewise. + * g++.dg/cpp0x/auto9.C: Likewise. + * g++.dg/cpp0x/lambda/lambda-eh2.C: Likewise. + * g++.dg/cpp0x/error5.C: Likewise. + * c-c++-common/gomp/atomic-12.c: Likewise. + * c-c++-common/gomp/atomic-13.c: Likewise. + * c-c++-common/gomp/atomic-14.c: Likewise. + * c-c++-common/Wvarargs-2.c: Likewise. + * c-c++-common/Wvarargs.c: Likewise. + * c-c++-common/vector-subscript-2.c: Likewise. + * g++.old-deja/g++.robertl/eb123.C: Likewise. + * g++.old-deja/g++.eh/tmpl3.C: Likewise. + * g++.old-deja/g++.eh/cleanup2.C: Likewise. + * g++.old-deja/g++.eh/badalloc1.C: Likewise. + * g++.old-deja/g++.eh/throw2.C: Likewise. + * g++.old-deja/g++.eh/throw1.C: Likewise. + * g++.old-deja/g++.eh/tmpl1.C: Likewise. + * g++.old-deja/g++.other/new7.C: Likewise. + * g++.old-deja/g++.other/crash30.C: Likewise. + * g++.old-deja/g++.other/regstack.C: Likewise. + * g++.old-deja/g++.other/crash28.C: Likewise. + * g++.old-deja/g++.jason/bool5.C: Likewise. + * g++.old-deja/g++.mike/p10416.C: Likewise. + * g++.old-deja/g++.mike/eh25.C: Likewise. + * g++.old-deja/g++.mike/eh55.C: Likewise. + PR rtl-optimization/82192 * gcc.c-torture/execute/pr82192.c: New test. diff --git a/gcc/testsuite/c-c++-common/Wvarargs-2.c b/gcc/testsuite/c-c++-common/Wvarargs-2.c index 1eacde1cbf2..a6b51f19e60 100644 --- a/gcc/testsuite/c-c++-common/Wvarargs-2.c +++ b/gcc/testsuite/c-c++-common/Wvarargs-2.c @@ -23,7 +23,7 @@ foo0 (int a, int b, ...) } void -foo1 (int a, register int b, ...) // { dg-warning "ISO C\\+\\+1z does not allow 'register' storage class specifier" "" { target c++1z } } +foo1 (int a, register int b, ...) // { dg-warning "ISO C\\+\\+17 does not allow 'register' storage class specifier" "" { target c++17 } } { va_list vp; /* 'b' is declared with register storage, but don't warn diff --git a/gcc/testsuite/c-c++-common/Wvarargs.c b/gcc/testsuite/c-c++-common/Wvarargs.c index 20d8ec77c03..71d8c5dff93 100644 --- a/gcc/testsuite/c-c++-common/Wvarargs.c +++ b/gcc/testsuite/c-c++-common/Wvarargs.c @@ -23,7 +23,7 @@ foo0 (int a, int b, ...) } void -foo1 (int a, register int b, ...) // { dg-warning "ISO C\\+\\+1z does not allow 'register' storage class specifier" "" { target c++1z } } +foo1 (int a, register int b, ...) // { dg-warning "ISO C\\+\\+17 does not allow 'register' storage class specifier" "" { target c++17 } } { va_list vp; /* 'b' is declared with register storage, but don't warn @@ -45,7 +45,7 @@ foo2 (int a, int b, ...) } void -foo3 (int a, register int b, ...) // { dg-warning "ISO C\\+\\+1z does not allow 'register' storage class specifier" "" { target c++1z } } +foo3 (int a, register int b, ...) // { dg-warning "ISO C\\+\\+17 does not allow 'register' storage class specifier" "" { target c++17 } } { va_list vp; /* 'b' is declared with register storage, so warn. */ diff --git a/gcc/testsuite/c-c++-common/gomp/atomic-12.c b/gcc/testsuite/c-c++-common/gomp/atomic-12.c index 07790d9c451..a750a7f71a4 100644 --- a/gcc/testsuite/c-c++-common/gomp/atomic-12.c +++ b/gcc/testsuite/c-c++-common/gomp/atomic-12.c @@ -4,7 +4,7 @@ /* atomicvar should never be referenced in between the barrier and following #pragma omp atomic_load. */ /* { dg-final { scan-tree-dump-not "barrier\[^#\]*atomicvar" "gimple" } } */ -/* { dg-skip-if "invalid in C++1z" { c++1z } } */ +/* { dg-skip-if "invalid in C++17" { c++17 } } */ #ifdef __cplusplus bool atomicvar, c; diff --git a/gcc/testsuite/c-c++-common/gomp/atomic-13.c b/gcc/testsuite/c-c++-common/gomp/atomic-13.c index 83c6560761a..5fd9c101660 100644 --- a/gcc/testsuite/c-c++-common/gomp/atomic-13.c +++ b/gcc/testsuite/c-c++-common/gomp/atomic-13.c @@ -4,6 +4,6 @@ /* atomicvar should never be referenced in between the barrier and following #pragma omp atomic_load. */ /* { dg-final { scan-tree-dump-not "barrier\[^#\]*atomicvar" "gimple" } } */ -/* { dg-skip-if "invalid in C++1z" { c++1z } } */ +/* { dg-skip-if "invalid in C++17" { c++17 } } */ #include "atomic-12.c" diff --git a/gcc/testsuite/c-c++-common/gomp/atomic-14.c b/gcc/testsuite/c-c++-common/gomp/atomic-14.c index f2dd9fcf89d..06b76692ec7 100644 --- a/gcc/testsuite/c-c++-common/gomp/atomic-14.c +++ b/gcc/testsuite/c-c++-common/gomp/atomic-14.c @@ -1,7 +1,7 @@ /* PR middle-end/45423 */ /* { dg-do compile } */ /* { dg-options "-fopenmp -Wno-deprecated" } */ -/* { dg-skip-if "invalid in C++1z" { c++1z } } */ +/* { dg-skip-if "invalid in C++17" { c++17 } } */ #ifdef __cplusplus bool *baz (); diff --git a/gcc/testsuite/c-c++-common/vector-subscript-2.c b/gcc/testsuite/c-c++-common/vector-subscript-2.c index bfe01fc2740..b81195fdedf 100644 --- a/gcc/testsuite/c-c++-common/vector-subscript-2.c +++ b/gcc/testsuite/c-c++-common/vector-subscript-2.c @@ -7,6 +7,6 @@ float vf(int i) { - register vector float a; // { dg-warning "ISO C\\+\\+1z does not allow 'register' storage class specifier" "" { target c++1z } } + register vector float a; // { dg-warning "ISO C\\+\\+17 does not allow 'register' storage class specifier" "" { target c++17 } } return a[0]; } diff --git a/gcc/testsuite/g++.dg/concepts/alias1.C b/gcc/testsuite/g++.dg/concepts/alias1.C index fdd54bd2af1..1b643cdd1c9 100644 --- a/gcc/testsuite/g++.dg/concepts/alias1.C +++ b/gcc/testsuite/g++.dg/concepts/alias1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/alias2.C b/gcc/testsuite/g++.dg/concepts/alias2.C index 7879d441961..2de2aa4da94 100644 --- a/gcc/testsuite/g++.dg/concepts/alias2.C +++ b/gcc/testsuite/g++.dg/concepts/alias2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/alias3.C b/gcc/testsuite/g++.dg/concepts/alias3.C index a8f0f67e04f..6e1c39ce174 100644 --- a/gcc/testsuite/g++.dg/concepts/alias3.C +++ b/gcc/testsuite/g++.dg/concepts/alias3.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/alias4.C b/gcc/testsuite/g++.dg/concepts/alias4.C index 8ffa0a10e3f..e7d93d5875f 100644 --- a/gcc/testsuite/g++.dg/concepts/alias4.C +++ b/gcc/testsuite/g++.dg/concepts/alias4.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/auto1.C b/gcc/testsuite/g++.dg/concepts/auto1.C index be9237d69fa..0c6fa465fa6 100644 --- a/gcc/testsuite/g++.dg/concepts/auto1.C +++ b/gcc/testsuite/g++.dg/concepts/auto1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template class A { }; diff --git a/gcc/testsuite/g++.dg/concepts/auto3.C b/gcc/testsuite/g++.dg/concepts/auto3.C index e1a4d7342aa..7b80fe314b8 100644 --- a/gcc/testsuite/g++.dg/concepts/auto3.C +++ b/gcc/testsuite/g++.dg/concepts/auto3.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template class tuple {}; diff --git a/gcc/testsuite/g++.dg/concepts/class-deduction1.C b/gcc/testsuite/g++.dg/concepts/class-deduction1.C index ad48cf838ff..476830d9252 100644 --- a/gcc/testsuite/g++.dg/concepts/class-deduction1.C +++ b/gcc/testsuite/g++.dg/concepts/class-deduction1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool Isint = __is_same_as(T,int); diff --git a/gcc/testsuite/g++.dg/concepts/class.C b/gcc/testsuite/g++.dg/concepts/class.C index 061105756cb..1c5242f8089 100644 --- a/gcc/testsuite/g++.dg/concepts/class.C +++ b/gcc/testsuite/g++.dg/concepts/class.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool Class() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/class1.C b/gcc/testsuite/g++.dg/concepts/class1.C index a2c4f5d1aed..94a5d23a873 100644 --- a/gcc/testsuite/g++.dg/concepts/class1.C +++ b/gcc/testsuite/g++.dg/concepts/class1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/class2.C b/gcc/testsuite/g++.dg/concepts/class2.C index 4b8706d8001..63891282085 100644 --- a/gcc/testsuite/g++.dg/concepts/class2.C +++ b/gcc/testsuite/g++.dg/concepts/class2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/class3.C b/gcc/testsuite/g++.dg/concepts/class3.C index c25c801f1f6..b2757567d4f 100644 --- a/gcc/testsuite/g++.dg/concepts/class3.C +++ b/gcc/testsuite/g++.dg/concepts/class3.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/class4.C b/gcc/testsuite/g++.dg/concepts/class4.C index af6db2509db..86eecbc4572 100644 --- a/gcc/testsuite/g++.dg/concepts/class4.C +++ b/gcc/testsuite/g++.dg/concepts/class4.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool Class() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/class5.C b/gcc/testsuite/g++.dg/concepts/class5.C index 218ec9f5a9f..76398609709 100644 --- a/gcc/testsuite/g++.dg/concepts/class5.C +++ b/gcc/testsuite/g++.dg/concepts/class5.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool One() { return sizeof(T) >= 4; } diff --git a/gcc/testsuite/g++.dg/concepts/class6.C b/gcc/testsuite/g++.dg/concepts/class6.C index 4a3a3d70a85..29dcb8ff97e 100644 --- a/gcc/testsuite/g++.dg/concepts/class6.C +++ b/gcc/testsuite/g++.dg/concepts/class6.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool One() { return sizeof(T) >= 4; } diff --git a/gcc/testsuite/g++.dg/concepts/constrained-parm.C b/gcc/testsuite/g++.dg/concepts/constrained-parm.C index 2650caeb9c4..feaf3bb6429 100644 --- a/gcc/testsuite/g++.dg/concepts/constrained-parm.C +++ b/gcc/testsuite/g++.dg/concepts/constrained-parm.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/decl-diagnose.C b/gcc/testsuite/g++.dg/concepts/decl-diagnose.C index 65785b25fe9..fcbfc8f6595 100644 --- a/gcc/testsuite/g++.dg/concepts/decl-diagnose.C +++ b/gcc/testsuite/g++.dg/concepts/decl-diagnose.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } typedef concept int CINT; // { dg-error "'concept' cannot appear in a typedef declaration" } diff --git a/gcc/testsuite/g++.dg/concepts/deduction-constraint1.C b/gcc/testsuite/g++.dg/concepts/deduction-constraint1.C index dfb0c6e9436..5eec87b3c0b 100644 --- a/gcc/testsuite/g++.dg/concepts/deduction-constraint1.C +++ b/gcc/testsuite/g++.dg/concepts/deduction-constraint1.C @@ -1,5 +1,5 @@ // PR c++/67007 -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool A = diff --git a/gcc/testsuite/g++.dg/concepts/diagnostic1.C b/gcc/testsuite/g++.dg/concepts/diagnostic1.C index 0552c4b0623..c977eaa8fcd 100644 --- a/gcc/testsuite/g++.dg/concepts/diagnostic1.C +++ b/gcc/testsuite/g++.dg/concepts/diagnostic1.C @@ -1,5 +1,5 @@ // PR c++/67159 -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool SameAs = __is_same_as(T, U); diff --git a/gcc/testsuite/g++.dg/concepts/disjunction1.C b/gcc/testsuite/g++.dg/concepts/disjunction1.C index 24472cc296d..9bd50974f57 100644 --- a/gcc/testsuite/g++.dg/concepts/disjunction1.C +++ b/gcc/testsuite/g++.dg/concepts/disjunction1.C @@ -1,5 +1,5 @@ // PR c++/66962 -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template struct remove_cv; template struct is_reference; diff --git a/gcc/testsuite/g++.dg/concepts/dr1430.C b/gcc/testsuite/g++.dg/concepts/dr1430.C index 178467a1691..9fd4f4301fc 100644 --- a/gcc/testsuite/g++.dg/concepts/dr1430.C +++ b/gcc/testsuite/g++.dg/concepts/dr1430.C @@ -1,5 +1,5 @@ // PR c++/66092 -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/equiv.C b/gcc/testsuite/g++.dg/concepts/equiv.C index 11e232fe2d5..d666d9a7567 100644 --- a/gcc/testsuite/g++.dg/concepts/equiv.C +++ b/gcc/testsuite/g++.dg/concepts/equiv.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } // Check equivalence of short- and longhand declarations. diff --git a/gcc/testsuite/g++.dg/concepts/equiv2.C b/gcc/testsuite/g++.dg/concepts/equiv2.C index 24d419b2ed3..694d87a2c56 100644 --- a/gcc/testsuite/g++.dg/concepts/equiv2.C +++ b/gcc/testsuite/g++.dg/concepts/equiv2.C @@ -1,5 +1,5 @@ // { dg-do run } -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } // template diff --git a/gcc/testsuite/g++.dg/concepts/explicit-inst1.C b/gcc/testsuite/g++.dg/concepts/explicit-inst1.C index 89eeb156b57..58d8dec0db6 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-inst1.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-inst1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-inst2.C b/gcc/testsuite/g++.dg/concepts/explicit-inst2.C index 0319756bfc5..f47b7585e62 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-inst2.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-inst2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-inst3.C b/gcc/testsuite/g++.dg/concepts/explicit-inst3.C index 177fc6c1368..00dee2fb2b9 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-inst3.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-inst3.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-inst4.C b/gcc/testsuite/g++.dg/concepts/explicit-inst4.C index cf0d8988bd3..c0f585c957a 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-inst4.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-inst4.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec1.C b/gcc/testsuite/g++.dg/concepts/explicit-spec1.C index c6f559cd1af..38730680e14 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec1.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-spec1.C @@ -1,5 +1,5 @@ // { dg-do run } -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec2.C b/gcc/testsuite/g++.dg/concepts/explicit-spec2.C index 8fa7e8aef16..17d48e7c220 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec2.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-spec2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec3.C b/gcc/testsuite/g++.dg/concepts/explicit-spec3.C index 6294cef5845..1edc83e95a8 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec3.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-spec3.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec4.C b/gcc/testsuite/g++.dg/concepts/explicit-spec4.C index 16698cbb366..963c030d464 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec4.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-spec4.C @@ -1,5 +1,5 @@ // { dg-do run } -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec5.C b/gcc/testsuite/g++.dg/concepts/explicit-spec5.C index e889c2192bf..e0d89bce2d6 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec5.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-spec5.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec6.C b/gcc/testsuite/g++.dg/concepts/explicit-spec6.C index 0bf7640df27..0af1df46d60 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec6.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-spec6.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template struct A { diff --git a/gcc/testsuite/g++.dg/concepts/expression.C b/gcc/testsuite/g++.dg/concepts/expression.C index de68ef89ee6..6430f89e309 100644 --- a/gcc/testsuite/g++.dg/concepts/expression.C +++ b/gcc/testsuite/g++.dg/concepts/expression.C @@ -1,5 +1,5 @@ // { dg-do run } -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } #include #include diff --git a/gcc/testsuite/g++.dg/concepts/expression2.C b/gcc/testsuite/g++.dg/concepts/expression2.C index 32b79c8f32b..3583452d47e 100644 --- a/gcc/testsuite/g++.dg/concepts/expression2.C +++ b/gcc/testsuite/g++.dg/concepts/expression2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C1() diff --git a/gcc/testsuite/g++.dg/concepts/expression3.C b/gcc/testsuite/g++.dg/concepts/expression3.C index 77b414e5cfc..4148aa6511e 100644 --- a/gcc/testsuite/g++.dg/concepts/expression3.C +++ b/gcc/testsuite/g++.dg/concepts/expression3.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() diff --git a/gcc/testsuite/g++.dg/concepts/feature-macro.C b/gcc/testsuite/g++.dg/concepts/feature-macro.C index d8ea3698147..ad2bfb080a0 100644 --- a/gcc/testsuite/g++.dg/concepts/feature-macro.C +++ b/gcc/testsuite/g++.dg/concepts/feature-macro.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } #ifndef __cpp_concepts #error __cpp_concepts not defined diff --git a/gcc/testsuite/g++.dg/concepts/fn-concept1.C b/gcc/testsuite/g++.dg/concepts/fn-concept1.C index 4a8437f010b..b858c1ac93f 100644 --- a/gcc/testsuite/g++.dg/concepts/fn-concept1.C +++ b/gcc/testsuite/g++.dg/concepts/fn-concept1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool Tuple() { // { dg-error "multiple statements" } diff --git a/gcc/testsuite/g++.dg/concepts/fn-concept2.C b/gcc/testsuite/g++.dg/concepts/fn-concept2.C index 86ba936d842..9acc24177ce 100644 --- a/gcc/testsuite/g++.dg/concepts/fn-concept2.C +++ b/gcc/testsuite/g++.dg/concepts/fn-concept2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept auto C1() { return 0; } // { dg-error "deduced return type" } diff --git a/gcc/testsuite/g++.dg/concepts/fn1.C b/gcc/testsuite/g++.dg/concepts/fn1.C index c4f9f555e0a..800a0d36f0b 100644 --- a/gcc/testsuite/g++.dg/concepts/fn1.C +++ b/gcc/testsuite/g++.dg/concepts/fn1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/fn10.C b/gcc/testsuite/g++.dg/concepts/fn10.C index 859c1d5eb21..71bd82c5f60 100644 --- a/gcc/testsuite/g++.dg/concepts/fn10.C +++ b/gcc/testsuite/g++.dg/concepts/fn10.C @@ -1,5 +1,5 @@ // { dg-do compile } -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } // Test that constraint satisfaction checks work even when // processing template declarations. diff --git a/gcc/testsuite/g++.dg/concepts/fn2.C b/gcc/testsuite/g++.dg/concepts/fn2.C index 51a3fb5fd8e..67e35acc362 100644 --- a/gcc/testsuite/g++.dg/concepts/fn2.C +++ b/gcc/testsuite/g++.dg/concepts/fn2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/fn3.C b/gcc/testsuite/g++.dg/concepts/fn3.C index ef704f7e135..6695f2f98a6 100644 --- a/gcc/testsuite/g++.dg/concepts/fn3.C +++ b/gcc/testsuite/g++.dg/concepts/fn3.C @@ -1,5 +1,5 @@ // { dg-do run } -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/fn4.C b/gcc/testsuite/g++.dg/concepts/fn4.C index 9fa5790fd5e..ecc3d7b1bee 100644 --- a/gcc/testsuite/g++.dg/concepts/fn4.C +++ b/gcc/testsuite/g++.dg/concepts/fn4.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/fn5.C b/gcc/testsuite/g++.dg/concepts/fn5.C index dd9a19e9f19..d4a2e003b9c 100644 --- a/gcc/testsuite/g++.dg/concepts/fn5.C +++ b/gcc/testsuite/g++.dg/concepts/fn5.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } // Check shorthand notation. diff --git a/gcc/testsuite/g++.dg/concepts/fn6.C b/gcc/testsuite/g++.dg/concepts/fn6.C index f6f165e0999..12936076449 100644 --- a/gcc/testsuite/g++.dg/concepts/fn6.C +++ b/gcc/testsuite/g++.dg/concepts/fn6.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } // Redefinition errors. diff --git a/gcc/testsuite/g++.dg/concepts/fn7.C b/gcc/testsuite/g++.dg/concepts/fn7.C index dd16a9ae65b..1df21fe9024 100644 --- a/gcc/testsuite/g++.dg/concepts/fn7.C +++ b/gcc/testsuite/g++.dg/concepts/fn7.C @@ -1,5 +1,5 @@ // { dg-do link } -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } // FIXME: What is this actually testing? diff --git a/gcc/testsuite/g++.dg/concepts/fn8.C b/gcc/testsuite/g++.dg/concepts/fn8.C index e7481be2f05..5c796c7e3b2 100644 --- a/gcc/testsuite/g++.dg/concepts/fn8.C +++ b/gcc/testsuite/g++.dg/concepts/fn8.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool Class() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/fn9.C b/gcc/testsuite/g++.dg/concepts/fn9.C index c135bd7010a..1efde5f744a 100644 --- a/gcc/testsuite/g++.dg/concepts/fn9.C +++ b/gcc/testsuite/g++.dg/concepts/fn9.C @@ -1,5 +1,5 @@ // { dg-do run } -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/friend1.C b/gcc/testsuite/g++.dg/concepts/friend1.C index c78940ce813..c437c79d01f 100644 --- a/gcc/testsuite/g++.dg/concepts/friend1.C +++ b/gcc/testsuite/g++.dg/concepts/friend1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool Eq() { return requires(T t) { t == t; }; } diff --git a/gcc/testsuite/g++.dg/concepts/friend2.C b/gcc/testsuite/g++.dg/concepts/friend2.C index 6268801a260..5f14905a738 100644 --- a/gcc/testsuite/g++.dg/concepts/friend2.C +++ b/gcc/testsuite/g++.dg/concepts/friend2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool Eq() { return requires(T t) { t == t; }; } diff --git a/gcc/testsuite/g++.dg/concepts/generic-fn-err.C b/gcc/testsuite/g++.dg/concepts/generic-fn-err.C index 03a47d5c959..c34f832816e 100644 --- a/gcc/testsuite/g++.dg/concepts/generic-fn-err.C +++ b/gcc/testsuite/g++.dg/concepts/generic-fn-err.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/generic-fn.C b/gcc/testsuite/g++.dg/concepts/generic-fn.C index d74ea21b6ef..7a48e7640d0 100644 --- a/gcc/testsuite/g++.dg/concepts/generic-fn.C +++ b/gcc/testsuite/g++.dg/concepts/generic-fn.C @@ -1,5 +1,5 @@ // { dg-do run } -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } #include #include diff --git a/gcc/testsuite/g++.dg/concepts/iconv1.C b/gcc/testsuite/g++.dg/concepts/iconv1.C index 28f3566d417..38a0b17b1f8 100644 --- a/gcc/testsuite/g++.dg/concepts/iconv1.C +++ b/gcc/testsuite/g++.dg/concepts/iconv1.C @@ -1,5 +1,5 @@ // PR c++/67240 -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } int foo(int x) { diff --git a/gcc/testsuite/g++.dg/concepts/inherit-ctor1.C b/gcc/testsuite/g++.dg/concepts/inherit-ctor1.C index 6f5115c6c85..952c8f61ef4 100644 --- a/gcc/testsuite/g++.dg/concepts/inherit-ctor1.C +++ b/gcc/testsuite/g++.dg/concepts/inherit-ctor1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/inherit-ctor2.C b/gcc/testsuite/g++.dg/concepts/inherit-ctor2.C index 435745a1fa9..b36b993098a 100644 --- a/gcc/testsuite/g++.dg/concepts/inherit-ctor2.C +++ b/gcc/testsuite/g++.dg/concepts/inherit-ctor2.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/inherit-ctor3.C b/gcc/testsuite/g++.dg/concepts/inherit-ctor3.C index 07499bb40f9..c7ad84aa6e7 100644 --- a/gcc/testsuite/g++.dg/concepts/inherit-ctor3.C +++ b/gcc/testsuite/g++.dg/concepts/inherit-ctor3.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/inherit-ctor4.C b/gcc/testsuite/g++.dg/concepts/inherit-ctor4.C index 4c53205466d..26940ba44be 100644 --- a/gcc/testsuite/g++.dg/concepts/inherit-ctor4.C +++ b/gcc/testsuite/g++.dg/concepts/inherit-ctor4.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/intro1.C b/gcc/testsuite/g++.dg/concepts/intro1.C index 5f036c4b645..ac8a708b107 100644 --- a/gcc/testsuite/g++.dg/concepts/intro1.C +++ b/gcc/testsuite/g++.dg/concepts/intro1.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/concepts/intro2.C b/gcc/testsuite/g++.dg/concepts/intro2.C index 1db1d7a493f..928cc2e5487 100644 --- a/gcc/testsuite/g++.dg/concepts/intro2.C +++ b/gcc/testsuite/g++.dg/concepts/intro2.C @@ -1,5 +1,5 @@ // { dg-do run } -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/intro3.C b/gcc/testsuite/g++.dg/concepts/intro3.C index 3cb3ecbb8b4..78d091d3a88 100644 --- a/gcc/testsuite/g++.dg/concepts/intro3.C +++ b/gcc/testsuite/g++.dg/concepts/intro3.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C1 = true; diff --git a/gcc/testsuite/g++.dg/concepts/intro4.C b/gcc/testsuite/g++.dg/concepts/intro4.C index 18212916555..2a3e2ba17e4 100644 --- a/gcc/testsuite/g++.dg/concepts/intro4.C +++ b/gcc/testsuite/g++.dg/concepts/intro4.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C1 = true; diff --git a/gcc/testsuite/g++.dg/concepts/intro5.C b/gcc/testsuite/g++.dg/concepts/intro5.C index 31924f930a7..c5fac8000c3 100644 --- a/gcc/testsuite/g++.dg/concepts/intro5.C +++ b/gcc/testsuite/g++.dg/concepts/intro5.C @@ -1,4 +1,4 @@ -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template concept bool C() diff --git a/gcc/testsuite/g++.dg/concepts/intro6.C b/gcc/testsuite/g++.dg/concepts/intro6.C index f8ed6669f14..6624c8888a9 100644 --- a/gcc/testsuite/g++.dg/concepts/intro6.C +++ b/gcc/testsuite/g++.dg/concepts/intro6.C @@ -1,5 +1,5 @@ // PR c++/67003 -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } namespace X { template diff --git a/gcc/testsuite/g++.dg/concepts/intro7.C b/gcc/testsuite/g++.dg/concepts/intro7.C index 914c5fd6110..9cb4a76740b 100644 --- a/gcc/testsuite/g++.dg/concepts/intro7.C +++ b/gcc/testsuite/g++.dg/concepts/intro7.C @@ -1,5 +1,5 @@ // PR c++/66985 -// { dg-options "-std=c++1z -fconcepts" } +// { dg-options "-std=c++17 -fconcepts" } template