diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-09-15 18:15:46 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-09-15 18:15:46 +0200 |
commit | 7b9361409dda228eedb13a3abe547c3cafbe957b (patch) | |
tree | ab528462949004d5d5871813f8f16e42bae6dd2b /gcc/c-family | |
parent | a1189286e5dedc4ab4aacda95216b047017cd3cf (diff) | |
download | gcc-7b9361409dda228eedb13a3abe547c3cafbe957b.zip gcc-7b9361409dda228eedb13a3abe547c3cafbe957b.tar.gz gcc-7b9361409dda228eedb13a3abe547c3cafbe957b.tar.bz2 |
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
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 19 | ||||
-rw-r--r-- | gcc/c-family/c-common.h | 4 | ||||
-rw-r--r-- | gcc/c-family/c-opts.c | 30 | ||||
-rw-r--r-- | gcc/c-family/c.opt | 24 |
4 files changed, 49 insertions, 28 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 6391ced..4fffa31 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,22 @@ +2017-09-15 Jakub Jelinek <jakub@redhat.com> + + * 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 <hongjiu.lu@intel.com> * 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 0de549d..d57829b 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 9e7f0a3..cdbcd6c 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 3435fe9..ed5938f 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 |