]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libcpp/
authoremsr <emsr@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 23 Aug 2014 16:50:22 +0000 (16:50 +0000)
committeremsr <emsr@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 23 Aug 2014 16:50:22 +0000 (16:50 +0000)
2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>

* include/cpplib.h (enum c_lang): Add CLK_GNUCXX1Z, CLK_CXX1Z;
Rename CLK_GNUCXX1Y, CLK_CXX1Y to CLK_GNUCXX14, CLK_CXX14;
* init.c (struct lang_flags lang_defaults): Add column for trigraphs;
Add rows for CLK_GNUCXX1Z, CLK_CXX1Z; (cpp_set_lang): Set trigraphs;
(cpp_init_builtins): Set __cplusplus to 201402L for C++14;
Set __cplusplus to 201500L for C++17.
* expr.c (cpp_classify_number): Change C++1y to C++14 in binary
constants error message.

gcc/c-family/

2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>

* c-common.h (enum cxx_dialect): Add cxx14.
* c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
* c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.

gcc/cp/

2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>

* decl.c (compute_array_index_type, grokdeclarator,
undeduced_auto_decl): Change from cxx1y to cxx14.
*lambda.c(add_capture()): Change error message from C++1y to C++14.
* parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
cp_parser_decltype, cp_parser_conversion_type_id,
cp_parser_simple_type_specifier, cp_parser_type_id_1,
cp_parser_template_type_arg, cp_parser_std_attribute,
cp_parser_template_declaration_after_export): Ditto.
* pt.c (tsubst): Ditto.
* semantics.c (force_paren_expr, finish_decltype_type): Ditto.
* tree.c: Change comment.
* typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.

gcc/

2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>

* doc/invoke.texi: Change c++1y to c++14 and gnu++1y to gnu++14.
Deprecate c++1y. Change language to reflect greater confidence in C++14.

gcc/testsuite/

2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>

* g++.dg/cpp0x/cplusplus.C: New.
* g++.dg/cpp0x/cplusplus_0x.C: New.
* g++.dg/cpp0x/auto3.C: Change c++1y to c++14.
* g++.dg/cpp0x/auto41.C: Ditto.
* g++.dg/cpp0x/auto9.C: Ditto.
* g++.dg/cpp0x/initlist26.C: Ditto.
* g++.dg/cpp0x/pr59111.C: Ditto.
* g++.dg/cpp0x/trailing2.C: Ditto.
* g++.dg/cpp1y/attr-deprecated.C: Ditto.
* g++.dg/cpp1y/auto-dtor1.C: Ditto.
* g++.dg/cpp1y/auto-fn1.C: Ditto.
* g++.dg/cpp1y/auto-fn2.C: Ditto.
* g++.dg/cpp1y/auto-fn3.C: Ditto.
* g++.dg/cpp1y/auto-fn4.C: Ditto.
* g++.dg/cpp1y/auto-fn5.C: Ditto.
* g++.dg/cpp1y/auto-fn6.C: Ditto.
* g++.dg/cpp1y/auto-fn7.C: Ditto.
* g++.dg/cpp1y/auto-fn8.C: Ditto.
* g++.dg/cpp1y/auto-fn9.C: Ditto.
* g++.dg/cpp1y/auto-fn10.C: Ditto.
* g++.dg/cpp1y/auto-fn11.C: Ditto.
* g++.dg/cpp1y/auto-fn12.C: Ditto.
* g++.dg/cpp1y/auto-fn13.C: Ditto.
* g++.dg/cpp1y/auto-fn14.C: Ditto.
* g++.dg/cpp1y/auto-fn15.C: Ditto.
* g++.dg/cpp1y/auto-fn16.C: Ditto.
* g++.dg/cpp1y/auto-fn17.C: Ditto.
* g++.dg/cpp1y/auto-fn18.C: Ditto.
* g++.dg/cpp1y/auto-fn19.C: Ditto.
* g++.dg/cpp1y/auto-fn20.C: Ditto.
* g++.dg/cpp1y/auto-fn21.C: Ditto.
* g++.dg/cpp1y/auto-fn22.C: Ditto.
* g++.dg/cpp1y/auto-fn23.C: Ditto.
* g++.dg/cpp1y/auto-fn24.C: Ditto.
* g++.dg/cpp1y/auto-fn25.C: Ditto.
* g++.dg/cpp1y/auto-mangle1.C: Ditto.
* g++.dg/cpp1y/auto-neg1.C: Ditto.
* g++.dg/cpp1y/digit-sep.C: Ditto.
* g++.dg/cpp1y/digit-sep-neg.C: Ditto.
* g++.dg/cpp1y/digit-sep-cxx11-neg.C: Ditto.
* g++.dg/cpp1y/fn-generic-member-ool.C: Ditto.
* g++.dg/cpp1y/lambda-deduce-mult.C: Ditto.
* g++.dg/cpp1y/lambda-generic.C: Ditto.
* g++.dg/cpp1y/lambda-generic-cfun.C: Ditto.
* g++.dg/cpp1y/lambda-generic-dep.C: Ditto.
* g++.dg/cpp1y/lambda-generic-mixed.C: Ditto.
* g++.dg/cpp1y/lambda-generic-udt.C: Ditto.
* g++.dg/cpp1y/lambda-generic-variadic.C: Ditto.
* g++.dg/cpp1y/lambda-generic-vla1.C: Ditto.
* g++.dg/cpp1y/lambda-generic-x.C: Ditto.
* g++.dg/cpp1y/lambda-generic-xcfun.C: Ditto.
* g++.dg/cpp1y/lambda-generic-xudt.C: Ditto.
* g++.dg/cpp1y/lambda-init.C: Ditto.
* g++.dg/cpp1y/lambda-init1.C: Ditto.
* g++.dg/cpp1y/lambda-init2.C: Ditto.
* g++.dg/cpp1y/lambda-init3.C: Ditto.
* g++.dg/cpp1y/lambda-init4.C: Ditto.
* g++.dg/cpp1y/lambda-init5.C: Ditto.
* g++.dg/cpp1y/lambda-init6.C: Ditto.
* g++.dg/cpp1y/lambda-init7.C: Ditto.
* g++.dg/cpp1y/lambda-init8.C: Ditto.
* g++.dg/cpp1y/lambda-init9.C: Ditto.
* g++.dg/cpp1y/mangle1.C: Ditto.
* g++.dg/cpp1y/pr57640.C: Ditto.
* g++.dg/cpp1y/pr57644.C: Ditto.
* g++.dg/cpp1y/pr58500.C: Ditto.
* g++.dg/cpp1y/pr58533.C: Ditto.
* g++.dg/cpp1y/pr58534.C: Ditto.
* g++.dg/cpp1y/pr58535.C: Ditto.
* g++.dg/cpp1y/pr58536.C: Ditto.
* g++.dg/cpp1y/pr58548.C: Ditto.
* g++.dg/cpp1y/pr58549.C: Ditto.
* g++.dg/cpp1y/pr58637.C: Ditto.
* g++.dg/cpp1y/pr58708.C: Ditto.
* g++.dg/cpp1y/pr59110.C: Ditto.
* g++.dg/cpp1y/pr59112.C: Ditto.
* g++.dg/cpp1y/pr59113.C: Ditto.
* g++.dg/cpp1y/pr59629.C: Ditto.
* g++.dg/cpp1y/pr59635.C: Ditto.
* g++.dg/cpp1y/pr59636.C: Ditto.
* g++.dg/cpp1y/pr59638.C: Ditto.
* g++.dg/cpp1y/pr59867.C: Ditto.
* g++.dg/cpp1y/pr60033.C: Ditto.
* g++.dg/cpp1y/pr60052.C: Ditto.
* g++.dg/cpp1y/pr60053.C: Ditto.
* g++.dg/cpp1y/pr60054.C: Ditto.
* g++.dg/cpp1y/pr60064.C: Ditto.
* g++.dg/cpp1y/pr60065.C: Ditto.
* g++.dg/cpp1y/pr60190.C: Ditto.
* g++.dg/cpp1y/pr60311.C: Ditto.
* g++.dg/cpp1y/pr60332.C: Ditto.
* g++.dg/cpp1y/pr60376.C: Ditto.
* g++.dg/cpp1y/pr60377.C: Ditto.
* g++.dg/cpp1y/pr60384.C: Ditto.
* g++.dg/cpp1y/pr60390.C: Ditto.
* g++.dg/cpp1y/pr60391.C: Ditto.
* g++.dg/cpp1y/pr60393.C: Ditto.
* g++.dg/cpp1y/pr60573.C: Ditto.
* g++.dg/cpp1y/pr60626.C: Ditto.
* g++.dg/cpp1y/pr60627.C: Ditto.
* g++.dg/cpp1y/regress1.C: Ditto.
* g++.dg/cpp1y/system-binary-constants-1.C: Ditto.
* g++.dg/cpp1y/udlit-char-template.C: Ditto.
* g++.dg/cpp1y/udlit-char-template-neg.C: Ditto.
* g++.dg/cpp1y/udlit-empty-string-neg.C: Ditto.
* g++.dg/cpp1y/udlit-enc-prefix-neg.C: Ditto.
* g++.dg/cpp1y/udlit-userdef-string.C: Ditto.
* g++.dg/cpp1y/var-templ1.C: Ditto.
* g++.dg/cpp1y/var-templ2.C: Ditto.
* g++.dg/cpp1y/var-templ3.C: Ditto.
* g++.dg/cpp1y/var-templ4.C: Ditto.
* g++.dg/cpp1y/var-templ5.C: Ditto.
* g++.dg/cpp1y/var-templ6.C: Ditto.
* g++.dg/cpp1y/var-templ7.C: Ditto.
* g++.dg/cpp1y/vla1.C: Ditto.
* g++.dg/cpp1y/vla2.C: Ditto.
* g++.dg/cpp1y/vla3.C: Ditto.
* g++.dg/cpp1y/vla4.C: Ditto.
* g++.dg/cpp1y/vla5.C: Ditto.
* g++.dg/cpp1y/vla8.C: Ditto.
* g++.dg/cpp1y/vla9.C: Ditto.
* g++.dg/cpp1y/vla10.C: Ditto.
* g++.dg/cpp1y/vla11.C: Ditto.
* g++.dg/cpp1y/vla12.C: Ditto.
* g++.dg/cpp1y/vla13.C: Ditto.
* g++.dg/cpp1y/vla-initlist1.C: Ditto.
* g++.dg/ext/vector23.C: Ditto.
* g++.dg/ext/vla11.C: Ditto.
* gcc/testsuite/g++.dg/ubsan/cxx1y-vla.C: Ditto.
* g++.dg/warn/Wvla-2.C: Ditto.
* g++.dg/debug/dwarf2/auto1.C: Ditto.
* g++.dg/cpp1z/typename-tmpl-tmpl-parm-ped-neg.C: Ditto.
* g++.dg/cpp1y/cplusplus.C: Check for exact date.
* g++.dg/cpp1y/system-binary-constants-1.C: Check C++14 instead of C++1y
in error message.
* g++.dg/system-binary-constants-1.C: Ditto.
* g++.dg/cpp1y/cplusplus_1y.C: New.
* g++.dg/cpp1z/cplusplus.C: New.
* lib/target-supports.exp:
(check_effective_target_c++1y*): Rename to check_effective_target_c++14*
(check_effective_target_c++11_only): Call check_effective_target_c++14;
(check_effective_target_c++11_down): Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214400 138bc75d-0d04-0410-961f-82ee72b054a4

156 files changed:
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-common.h
gcc/c-family/c-opts.c
gcc/c-family/c-ubsan.c
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/lambda.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/cp/tree.c
gcc/cp/typeck.c
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/auto3.C
gcc/testsuite/g++.dg/cpp0x/auto41.C
gcc/testsuite/g++.dg/cpp0x/auto9.C
gcc/testsuite/g++.dg/cpp0x/cplusplus.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/cplusplus_0x.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/initlist26.C
gcc/testsuite/g++.dg/cpp0x/pr59111.C
gcc/testsuite/g++.dg/cpp0x/trailing2.C
gcc/testsuite/g++.dg/cpp1y/attr-deprecated.C
gcc/testsuite/g++.dg/cpp1y/auto-dtor1.C
gcc/testsuite/g++.dg/cpp1y/auto-fn1.C
gcc/testsuite/g++.dg/cpp1y/auto-fn10.C
gcc/testsuite/g++.dg/cpp1y/auto-fn11.C
gcc/testsuite/g++.dg/cpp1y/auto-fn12.C
gcc/testsuite/g++.dg/cpp1y/auto-fn13.C
gcc/testsuite/g++.dg/cpp1y/auto-fn14.C
gcc/testsuite/g++.dg/cpp1y/auto-fn15.C
gcc/testsuite/g++.dg/cpp1y/auto-fn16.C
gcc/testsuite/g++.dg/cpp1y/auto-fn17.C
gcc/testsuite/g++.dg/cpp1y/auto-fn18.C
gcc/testsuite/g++.dg/cpp1y/auto-fn19.C
gcc/testsuite/g++.dg/cpp1y/auto-fn2.C
gcc/testsuite/g++.dg/cpp1y/auto-fn20.C
gcc/testsuite/g++.dg/cpp1y/auto-fn21.C
gcc/testsuite/g++.dg/cpp1y/auto-fn22.C
gcc/testsuite/g++.dg/cpp1y/auto-fn23.C
gcc/testsuite/g++.dg/cpp1y/auto-fn24.C
gcc/testsuite/g++.dg/cpp1y/auto-fn25.C
gcc/testsuite/g++.dg/cpp1y/auto-fn3.C
gcc/testsuite/g++.dg/cpp1y/auto-fn4.C
gcc/testsuite/g++.dg/cpp1y/auto-fn5.C
gcc/testsuite/g++.dg/cpp1y/auto-fn6.C
gcc/testsuite/g++.dg/cpp1y/auto-fn7.C
gcc/testsuite/g++.dg/cpp1y/auto-fn8.C
gcc/testsuite/g++.dg/cpp1y/auto-fn9.C
gcc/testsuite/g++.dg/cpp1y/auto-mangle1.C
gcc/testsuite/g++.dg/cpp1y/auto-neg1.C
gcc/testsuite/g++.dg/cpp1y/cplusplus.C
gcc/testsuite/g++.dg/cpp1y/cplusplus_1y.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/digit-sep-cxx11-neg.C
gcc/testsuite/g++.dg/cpp1y/digit-sep-neg.C
gcc/testsuite/g++.dg/cpp1y/digit-sep.C
gcc/testsuite/g++.dg/cpp1y/fn-generic-member-ool.C
gcc/testsuite/g++.dg/cpp1y/lambda-deduce-mult.C
gcc/testsuite/g++.dg/cpp1y/lambda-generic-cfun.C
gcc/testsuite/g++.dg/cpp1y/lambda-generic-dep.C
gcc/testsuite/g++.dg/cpp1y/lambda-generic-mixed.C
gcc/testsuite/g++.dg/cpp1y/lambda-generic-udt.C
gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic.C
gcc/testsuite/g++.dg/cpp1y/lambda-generic-vla1.C
gcc/testsuite/g++.dg/cpp1y/lambda-generic-x.C
gcc/testsuite/g++.dg/cpp1y/lambda-generic-xcfun.C
gcc/testsuite/g++.dg/cpp1y/lambda-generic-xudt.C
gcc/testsuite/g++.dg/cpp1y/lambda-generic.C
gcc/testsuite/g++.dg/cpp1y/lambda-init.C
gcc/testsuite/g++.dg/cpp1y/lambda-init1.C
gcc/testsuite/g++.dg/cpp1y/lambda-init2.C
gcc/testsuite/g++.dg/cpp1y/lambda-init3.C
gcc/testsuite/g++.dg/cpp1y/lambda-init4.C
gcc/testsuite/g++.dg/cpp1y/lambda-init5.C
gcc/testsuite/g++.dg/cpp1y/lambda-init6.C
gcc/testsuite/g++.dg/cpp1y/lambda-init7.C
gcc/testsuite/g++.dg/cpp1y/lambda-init8.C
gcc/testsuite/g++.dg/cpp1y/lambda-init9.C
gcc/testsuite/g++.dg/cpp1y/mangle1.C
gcc/testsuite/g++.dg/cpp1y/pr57640.C
gcc/testsuite/g++.dg/cpp1y/pr57644.C
gcc/testsuite/g++.dg/cpp1y/pr58500.C
gcc/testsuite/g++.dg/cpp1y/pr58533.C
gcc/testsuite/g++.dg/cpp1y/pr58534.C
gcc/testsuite/g++.dg/cpp1y/pr58535.C
gcc/testsuite/g++.dg/cpp1y/pr58536.C
gcc/testsuite/g++.dg/cpp1y/pr58548.C
gcc/testsuite/g++.dg/cpp1y/pr58549.C
gcc/testsuite/g++.dg/cpp1y/pr58637.C
gcc/testsuite/g++.dg/cpp1y/pr58708.C
gcc/testsuite/g++.dg/cpp1y/pr59110.C
gcc/testsuite/g++.dg/cpp1y/pr59112.C
gcc/testsuite/g++.dg/cpp1y/pr59113.C
gcc/testsuite/g++.dg/cpp1y/pr59629.C
gcc/testsuite/g++.dg/cpp1y/pr59635.C
gcc/testsuite/g++.dg/cpp1y/pr59636.C
gcc/testsuite/g++.dg/cpp1y/pr59638.C
gcc/testsuite/g++.dg/cpp1y/pr59867.C
gcc/testsuite/g++.dg/cpp1y/pr60033.C
gcc/testsuite/g++.dg/cpp1y/pr60052.C
gcc/testsuite/g++.dg/cpp1y/pr60053.C
gcc/testsuite/g++.dg/cpp1y/pr60054.C
gcc/testsuite/g++.dg/cpp1y/pr60064.C
gcc/testsuite/g++.dg/cpp1y/pr60065.C
gcc/testsuite/g++.dg/cpp1y/pr60190.C
gcc/testsuite/g++.dg/cpp1y/pr60311.C
gcc/testsuite/g++.dg/cpp1y/pr60332.C
gcc/testsuite/g++.dg/cpp1y/pr60376.C
gcc/testsuite/g++.dg/cpp1y/pr60377.C
gcc/testsuite/g++.dg/cpp1y/pr60384.C
gcc/testsuite/g++.dg/cpp1y/pr60390.C
gcc/testsuite/g++.dg/cpp1y/pr60391.C
gcc/testsuite/g++.dg/cpp1y/pr60393.C
gcc/testsuite/g++.dg/cpp1y/pr60573.C
gcc/testsuite/g++.dg/cpp1y/pr60626.C
gcc/testsuite/g++.dg/cpp1y/pr60627.C
gcc/testsuite/g++.dg/cpp1y/regress1.C
gcc/testsuite/g++.dg/cpp1y/system-binary-constants-1.C
gcc/testsuite/g++.dg/cpp1y/udlit-char-template-neg.C
gcc/testsuite/g++.dg/cpp1y/udlit-char-template.C
gcc/testsuite/g++.dg/cpp1y/udlit-empty-string-neg.C
gcc/testsuite/g++.dg/cpp1y/udlit-enc-prefix-neg.C
gcc/testsuite/g++.dg/cpp1y/udlit-userdef-string.C
gcc/testsuite/g++.dg/cpp1y/var-templ1.C
gcc/testsuite/g++.dg/cpp1y/var-templ2.C
gcc/testsuite/g++.dg/cpp1y/var-templ3.C
gcc/testsuite/g++.dg/cpp1y/var-templ4.C
gcc/testsuite/g++.dg/cpp1y/var-templ5.C
gcc/testsuite/g++.dg/cpp1y/var-templ6.C
gcc/testsuite/g++.dg/cpp1y/var-templ7.C
gcc/testsuite/g++.dg/cpp1y/vla-initlist1.C
gcc/testsuite/g++.dg/cpp1y/vla1.C
gcc/testsuite/g++.dg/cpp1y/vla10.C
gcc/testsuite/g++.dg/cpp1y/vla11.C
gcc/testsuite/g++.dg/cpp1y/vla12.C
gcc/testsuite/g++.dg/cpp1y/vla13.C
gcc/testsuite/g++.dg/cpp1y/vla2.C
gcc/testsuite/g++.dg/cpp1y/vla3.C
gcc/testsuite/g++.dg/cpp1y/vla4.C
gcc/testsuite/g++.dg/cpp1y/vla5.C
gcc/testsuite/g++.dg/cpp1y/vla8.C
gcc/testsuite/g++.dg/cpp1y/vla9.C
gcc/testsuite/g++.dg/cpp1z/cplusplus.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1z/typename-tmpl-tmpl-parm-ped-neg.C
gcc/testsuite/g++.dg/debug/dwarf2/auto1.C
gcc/testsuite/g++.dg/ext/vector23.C
gcc/testsuite/g++.dg/ext/vla11.C
gcc/testsuite/g++.dg/system-binary-constants-1.C
gcc/testsuite/g++.dg/ubsan/cxx1y-vla.C
gcc/testsuite/g++.dg/warn/Wvla-2.C
gcc/testsuite/lib/target-supports.exp
libcpp/ChangeLog
libcpp/expr.c
libcpp/include/cpplib.h
libcpp/init.c

index d01509ab4507432a160f248be6290b1ce38d2234..063648dbaf19932bc30a565cd8bec2c2c6d63ca7 100644 (file)
@@ -1,3 +1,8 @@
+2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
+
+       * doc/invoke.texi: Change c++1y to c++14 and gnu++1y to gnu++14.
+       Deprecate c++1y. Change language to reflect greater confidence in C++14.
+
 2014-08-23  John David Anglin  <danglin@gcc.gnu.org>
 
        PR target/62038
index 3be9622a58cf9a8e7d10c48d0b4301d2baddda8f..8f5bf10556427a751285eaa6482ee46067dad59b 100644 (file)
@@ -1,3 +1,10 @@
+2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
+
+       * c-common.h (enum cxx_dialect): Add cxx14.
+       * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
+       * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
+       cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
+
 2014-08-22  Jason Merrill  <jason@redhat.com>
 
        * c.opt (std=gnu++17): Fix alias.
index 20b65e99663ac2cb2d956c363305f76a0d890cb5..f621a3af040edd6874bbc5736400ebbdbe39d3a3 100644 (file)
@@ -640,8 +640,9 @@ enum cxx_dialect {
   /* C++11  */
   cxx0x,
   cxx11 = cxx0x,
-  /* C++1y (C++14?) */
+  /* C++1 */
   cxx1y,
+  cxx14 = cxx1y,
   /* C++1z (C++17?) */
   cxx1z
 };
index ddc480be1dd14cc8f000fba43e528626f42c50a8..42f175928fdee8d658129bac46f63a760d82c3e2 100644 (file)
@@ -116,7 +116,7 @@ static bool done_preinclude;
 static void handle_OPT_d (const char *);
 static void set_std_cxx98 (int);
 static void set_std_cxx11 (int);
-static void set_std_cxx1y (int);
+static void set_std_cxx14 (int);
 static void set_std_cxx1z (int);
 static void set_std_c89 (int, int);
 static void set_std_c99 (int);
@@ -702,7 +702,7 @@ c_common_handle_option (size_t scode, const char *arg, int value,
     case OPT_std_gnu__1y:
       if (!preprocessing_asm_p)
        {
-         set_std_cxx1y (code == OPT_std_c__1y /* ISO */);
+         set_std_cxx14 (code == OPT_std_c__1y /* ISO */);
          if (code == OPT_std_c__1y)
            cpp_opts->ext_numeric_literals = 0;
        }
@@ -1589,29 +1589,30 @@ set_std_cxx11 (int iso)
 
 /* Set the C++ 201y draft standard (without GNU extensions if ISO).  */
 static void
-set_std_cxx1y (int iso)
+set_std_cxx14 (int iso)
 {
-  cpp_set_lang (parse_in, iso ? CLK_CXX1Y: CLK_GNUCXX1Y);
+  cpp_set_lang (parse_in, iso ? CLK_CXX14: CLK_GNUCXX14);
   flag_no_gnu_keywords = iso;
   flag_no_nonansi_builtin = iso;
   flag_iso = iso;
   /* C++11 includes the C99 standard library.  */
   flag_isoc94 = 1;
   flag_isoc99 = 1;
-  cxx_dialect = cxx1y;
+  cxx_dialect = cxx14;
 }
 
 /* Set the C++ 201z draft standard (without GNU extensions if ISO).  */
 static void
 set_std_cxx1z (int iso)
 {
-  cpp_set_lang (parse_in, iso ? CLK_CXX1Y: CLK_GNUCXX1Y);
+  cpp_set_lang (parse_in, iso ? CLK_CXX1Z: CLK_GNUCXX1Z);
   flag_no_gnu_keywords = iso;
   flag_no_nonansi_builtin = iso;
   flag_iso = iso;
   /* C++11 includes the C99 standard library.  */
   flag_isoc94 = 1;
   flag_isoc99 = 1;
+  flag_isoc11 = 1;
   cxx_dialect = cxx1z;
 }
 
index e048c53ac3ee4e3051091cff841d712cb366d089..f0d9b70062338fbea6e9fa3947a5e9aa393e999b 100644 (file)
@@ -146,12 +146,12 @@ ubsan_instrument_shift (location_t loc, enum tree_code code,
                        build_int_cst (TREE_TYPE (tt), 0));
     }
 
-  /* For signed x << y, in C++11/C++14, the following:
+  /* For signed x << y, in C++11 and later, the following:
      x < 0 || ((unsigned) x >> (precm1 - y))
      if > 1, is undefined.  */
   if (code == LSHIFT_EXPR
       && !TYPE_UNSIGNED (TREE_TYPE (op0))
-      && (cxx_dialect == cxx11 || cxx_dialect == cxx1y))
+      && (cxx_dialect >= cxx11))
     {
       tree x = fold_build2 (MINUS_EXPR, integer_type_node, precm1, op1);
       tt = fold_convert_loc (loc, unsigned_type_for (type0), op0);
index 04b0e00b6cacccaecffa05097fa368062fcaa76d..e770ab0d035bab1780f9247c168c60b33d4f7832 100644 (file)
@@ -1,3 +1,20 @@
+2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
+
+       * decl.c (compute_array_index_type, grokdeclarator,
+       undeduced_auto_decl): Change from cxx1y to cxx14.
+       *lambda.c(add_capture()): Change error message from C++1y to C++14.
+       * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
+       cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
+       cp_parser_decltype, cp_parser_conversion_type_id,
+       cp_parser_simple_type_specifier, cp_parser_type_id_1,
+       cp_parser_template_type_arg, cp_parser_std_attribute,
+       cp_parser_template_declaration_after_export): Ditto.
+       * pt.c (tsubst): Ditto.
+       * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
+       * tree.c: Change comment.
+       * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
+       cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
+
 2014-08-23  Jason Merrill  <jason@redhat.com>
 
        Allow non-constexpr variable templates.
index 35ede7a0d8109a0c48f30d9ffdcffd6c91dc0539..e83192ad749be608a21c3668aec25f197cb50711 100644 (file)
@@ -8413,7 +8413,7 @@ compute_array_index_type (tree name, tree size, tsubst_flags_t complain)
           /* We don't allow VLAs at non-function scopes, or during
              tentative template substitution.  */
           || !at_function_scope_p ()
-          || (cxx_dialect < cxx1y && !(complain & tf_error)))
+          || (cxx_dialect < cxx14 && !(complain & tf_error)))
     {
       if (!(complain & tf_error))
        return error_mark_node;
@@ -8425,7 +8425,7 @@ compute_array_index_type (tree name, tree size, tsubst_flags_t complain)
        error ("size of array is not an integral constant-expression");
       size = integer_one_node;
     }
-  else if (cxx_dialect < cxx1y && pedantic && warn_vla != 0)
+  else if (cxx_dialect < cxx14 && pedantic && warn_vla != 0)
     {
       if (name)
        pedwarn (input_location, OPT_Wvla, "ISO C++ forbids variable length array %qD", name);
@@ -8483,7 +8483,7 @@ compute_array_index_type (tree name, tree size, tsubst_flags_t complain)
 
          stabilize_vla_size (itype);
 
-         if (cxx_dialect >= cxx1y && flag_exceptions)
+         if (cxx_dialect >= cxx14 && flag_exceptions)
            {
              /* If the VLA bound is larger than half the address space,
                 or less than zero, throw std::bad_array_length.  */
@@ -8499,7 +8499,7 @@ compute_array_index_type (tree name, tree size, tsubst_flags_t complain)
                                         DECL_ATTRIBUTES
                                           (current_function_decl)))
            {
-             /* From C++1y onwards, we throw an exception on a negative
+             /* From C++14 onwards, we throw an exception on a negative
                 length size of an array; see above.  */
 
              /* We have to add 1 -- in the ubsan routine we generate
@@ -8628,7 +8628,7 @@ create_array_type_for_decl (tree name, tree type, tree size)
       return error_mark_node;
     }
 
-  if (cxx_dialect >= cxx1y && array_of_runtime_bound_p (type)
+  if (cxx_dialect >= cxx14 && array_of_runtime_bound_p (type)
       && (flag_iso || warn_vla > 0))
     pedwarn (input_location, OPT_Wvla, "array of array of runtime bound");
 
@@ -9648,14 +9648,14 @@ grokdeclarator (const cp_declarator *declarator,
                        if (current_class_type
                            && LAMBDA_TYPE_P (current_class_type))
                          /* OK for C++11 lambdas.  */;
-                       else if (cxx_dialect < cxx1y)
+                       else if (cxx_dialect < cxx14)
                          {
                            error ("%qs function uses "
                                   "%<auto%> type specifier without trailing "
                                   "return type", name);
                            inform (input_location, "deduced return type "
-                                   "only available with -std=c++1y or "
-                                   "-std=gnu++1y");
+                                   "only available with -std=c++14 or "
+                                   "-std=gnu++14");
                          }
                        else if (virtualp)
                          {
@@ -9872,7 +9872,7 @@ grokdeclarator (const cp_declarator *declarator,
                    : G_("cannot declare pointer to qualified function type %qT"),
                   type);
 
-         if (cxx_dialect >= cxx1y && array_of_runtime_bound_p (type)
+         if (cxx_dialect >= cxx14 && array_of_runtime_bound_p (type)
              && (flag_iso || warn_vla > 0))
            pedwarn (input_location, OPT_Wvla,
                     declarator->kind == cdk_reference
@@ -10229,7 +10229,7 @@ grokdeclarator (const cp_declarator *declarator,
          type = error_mark_node;
        }
 
-      if (cxx_dialect >= cxx1y && array_of_runtime_bound_p (type)
+      if (cxx_dialect >= cxx14 && array_of_runtime_bound_p (type)
          && (flag_iso || warn_vla > 0))
        pedwarn (input_location, OPT_Wvla,
                 "typedef naming array of runtime bound");
@@ -10475,7 +10475,7 @@ grokdeclarator (const cp_declarator *declarator,
 
       if (type_uses_auto (type))
        {
-         if (cxx_dialect >= cxx1y)
+         if (cxx_dialect >= cxx14)
            error ("%<auto%> parameter not permitted in this context");
          else
            error ("parameter declared %<auto%>");
@@ -14629,7 +14629,7 @@ fndecl_declared_return_type (tree fn)
 bool
 undeduced_auto_decl (tree decl)
 {
-  if (cxx_dialect < cxx1y)
+  if (cxx_dialect < cxx14)
     return false;
   return type_uses_auto (TREE_TYPE (decl));
 }
index ddaa940672785c781803fc48ef52ca6c7aff5c24..0d8d4551a0f6aad6171ee5cc5b6d136390e4c170 100644 (file)
@@ -474,7 +474,7 @@ add_capture (tree lambda, tree id, tree orig_init, bool by_reference_p,
     }
   else if (variably_modified_type_p (type, NULL_TREE))
     {
-      error ("capture of variable-size type %qT that is not a C++1y array "
+      error ("capture of variable-size type %qT that is not a C++14 array "
             "of runtime bound", type);
       if (TREE_CODE (type) == ARRAY_TYPE
          && variably_modified_type_p (TREE_TYPE (type), NULL_TREE))
index 7d8b7101cd19aacb8ecc6c4cbcce5a661dc18a48..f0beb42cd20b6e100b5e923eaaad21470639335d 100644 (file)
@@ -4970,10 +4970,10 @@ cp_parser_unqualified_id (cp_parser* parser,
        /* ~auto means the destructor of whatever the object is.  */
        if (cp_parser_is_keyword (token, RID_AUTO))
          {
-           if (cxx_dialect < cxx1y)
+           if (cxx_dialect < cxx14)
              pedwarn (input_location, 0,
                       "%<~auto%> only available with "
-                      "-std=c++1y or -std=gnu++1y");
+                      "-std=c++14 or -std=gnu++14");
            cp_lexer_consume_token (parser->lexer);
            return build_nt (BIT_NOT_EXPR, make_auto ());
          }
@@ -6895,10 +6895,10 @@ cp_parser_pseudo_destructor_name (cp_parser* parser,
       && cp_lexer_nth_token_is_keyword (parser->lexer, 2, RID_AUTO)
       && !type_dependent_expression_p (object))
     {
-      if (cxx_dialect < cxx1y)
+      if (cxx_dialect < cxx14)
        pedwarn (input_location, 0,
                 "%<~auto%> only available with "
-                "-std=c++1y or -std=gnu++1y");
+                "-std=c++14 or -std=gnu++14");
       cp_lexer_consume_token (parser->lexer);
       cp_lexer_consume_token (parser->lexer);
       *scope = NULL_TREE;
@@ -9058,10 +9058,10 @@ cp_parser_lambda_introducer (cp_parser* parser, tree lambda_expr)
        {
          bool direct, non_constant;
          /* An explicit initializer exists.  */
-         if (cxx_dialect < cxx1y)
+         if (cxx_dialect < cxx14)
            pedwarn (input_location, 0,
                     "lambda capture initializers "
-                    "only available with -std=c++1y or -std=gnu++1y");
+                    "only available with -std=c++14 or -std=gnu++14");
          capture_init_expr = cp_parser_initializer (parser, &direct,
                                                     &non_constant);
          explicit_init_p = true;
@@ -9184,10 +9184,10 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr)
      an opening angle if present.  */
   if (cp_lexer_next_token_is (parser->lexer, CPP_LESS))
     {
-      if (cxx_dialect < cxx1y)
+      if (cxx_dialect < cxx14)
        pedwarn (parser->lexer->next_token->location, 0,
                 "lambda templates are only available with "
-                "-std=c++1y or -std=gnu++1y");
+                "-std=c++14 or -std=gnu++14");
 
       cp_lexer_consume_token (parser->lexer);
 
@@ -12162,7 +12162,7 @@ cp_parser_decltype (cp_parser *parser)
     return error_mark_node;
 
   /* decltype (auto) */
-  if (cxx_dialect >= cxx1y
+  if (cxx_dialect >= cxx14
       && cp_lexer_next_token_is_keyword (parser->lexer, RID_AUTO))
     {
       cp_lexer_consume_token (parser->lexer);
@@ -12345,7 +12345,7 @@ cp_parser_conversion_type_id (cp_parser* parser)
   if (! cp_parser_uncommitted_to_tentative_parse_p (parser)
       && type_uses_auto (type_specified))
     {
-      if (cxx_dialect < cxx1y)
+      if (cxx_dialect < cxx14)
        {
          error ("invalid use of %<auto%> in conversion operator");
          return error_mark_node;
@@ -14710,17 +14710,17 @@ cp_parser_simple_type_specifier (cp_parser* parser,
 
          if (current_class_type && LAMBDA_TYPE_P (current_class_type))
            {
-             if (cxx_dialect < cxx1y)
+             if (cxx_dialect < cxx14)
                pedwarn (location_of (type), 0,
                         "use of %<auto%> in lambda parameter declaration "
                         "only available with "
-                        "-std=c++1y or -std=gnu++1y");
+                        "-std=c++14 or -std=gnu++14");
            }
-         else if (cxx_dialect < cxx1y)
+         else if (cxx_dialect < cxx14)
            pedwarn (location_of (type), 0,
                     "use of %<auto%> in parameter declaration "
                     "only available with "
-                    "-std=c++1y or -std=gnu++1y");
+                    "-std=c++14 or -std=gnu++14");
          else
            pedwarn (location_of (type), OPT_Wpedantic,
                     "ISO C++ forbids use of %<auto%> in parameter "
@@ -18215,7 +18215,7 @@ cp_parser_type_id_1 (cp_parser* parser, bool is_template_arg,
   if (type_specifier_seq.type
       /* None of the valid uses of 'auto' in C++14 involve the type-id
         nonterminal, but it is valid in a trailing-return-type.  */
-      && !(cxx_dialect >= cxx1y && is_trailing_return)
+      && !(cxx_dialect >= cxx14 && is_trailing_return)
       && type_uses_auto (type_specifier_seq.type))
     {
       /* A type-id with type 'auto' is only ok if the abstract declarator
@@ -18248,7 +18248,7 @@ static tree cp_parser_template_type_arg (cp_parser *parser)
     = G_("types may not be defined in template arguments");
   r = cp_parser_type_id_1 (parser, true, false);
   parser->type_definition_forbidden_message = saved_message;
-  if (cxx_dialect >= cxx1y && type_uses_auto (r))
+  if (cxx_dialect >= cxx14 && type_uses_auto (r))
     {
       error ("invalid use of %<auto%> in template argument");
       r = error_mark_node;
@@ -22104,7 +22104,7 @@ cp_parser_std_attribute (cp_parser *parser)
       if (is_attribute_p ("noreturn", attr_id))
        TREE_PURPOSE (TREE_PURPOSE (attribute)) = get_identifier ("gnu");
       /* C++14 deprecated attribute is equivalent to GNU's.  */
-      else if (cxx_dialect >= cxx1y && is_attribute_p ("deprecated", attr_id))
+      else if (cxx_dialect >= cxx14 && is_attribute_p ("deprecated", attr_id))
        TREE_PURPOSE (TREE_PURPOSE (attribute)) = get_identifier ("gnu");
     }
 
@@ -23317,7 +23317,7 @@ cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p)
                  || !TEMPLATE_PARM_PARAMETER_PACK (DECL_INITIAL (parm)))
                ok = false;
            }
-         else if (num_parms == 2 && cxx_dialect >= cxx1y)
+         else if (num_parms == 2 && cxx_dialect >= cxx14)
            {
              tree parm_type = TREE_VEC_ELT (parameter_list, 0);
              tree type = INNERMOST_TEMPLATE_PARMS (parm_type);
@@ -23332,7 +23332,7 @@ cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p)
        }
       if (!ok)
        {
-         if (cxx_dialect >= cxx1y)
+         if (cxx_dialect >= cxx14)
            error ("literal operator template %qD has invalid parameter list."
                   "  Expected non-type template argument pack <char...>"
                   " or <typename CharT, CharT...>",
index 14b5bfb190a498292ac9015e1e74ba20dca5256a..a40f9d2ad7c653306e63e4045bb273941ad320ce 100644 (file)
@@ -2310,10 +2310,10 @@ check_template_variable (tree decl)
   int wanted = num_template_headers_for_class (ctx);
   if (!TYPE_P (ctx) || !CLASSTYPE_TEMPLATE_INFO (ctx))
     {
-      if (cxx_dialect < cxx1y)
+      if (cxx_dialect < cxx14)
         pedwarn (DECL_SOURCE_LOCATION (decl), 0,
                  "variable templates only available with "
-                 "-std=c++1y or -std=gnu++1y");
+                 "-std=c++14 or -std=gnu++14");
 
       // Namespace-scope variable templates should have a template header.
       ++wanted;
@@ -12131,7 +12131,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
          r = cp_build_reference_type (type, TYPE_REF_IS_RVALUE (t));
        r = cp_build_qualified_type_real (r, cp_type_quals (t), complain);
 
-       if (cxx_dialect >= cxx1y
+       if (cxx_dialect >= cxx14
            && !(TREE_CODE (t) == REFERENCE_TYPE && REFERENCE_VLA_OK (t))
            && array_of_runtime_bound_p (type)
            && (flag_iso || warn_vla > 0))
index aed820cdda560ebda43589ce3f9f832a15edc4f1..a54011f7ce9da4af130d17ba1737b8c9d2446bf6 100644 (file)
@@ -1610,7 +1610,7 @@ tree
 force_paren_expr (tree expr)
 {
   /* This is only needed for decltype(auto) in C++14.  */
-  if (cxx_dialect < cxx1y)
+  if (cxx_dialect < cxx14)
     return expr;
 
   /* If we're in unevaluated context, we can't be deducing a
@@ -7064,7 +7064,7 @@ finish_decltype_type (tree expr, bool id_expression_or_member_access_p,
        }
     }
 
-  if (cxx_dialect >= cxx1y && array_of_runtime_bound_p (type)
+  if (cxx_dialect >= cxx14 && array_of_runtime_bound_p (type)
       && (flag_iso || warn_vla > 0))
     {
       if (complain & tf_warning_or_error)
index c9199f2c186a544a9a57667cd7d0d2cdecb9e96e..d0e11806ef6eac7b933c2c5fd89d4aa8e5956917 100644 (file)
@@ -904,7 +904,7 @@ build_array_of_n_type (tree elt, int n)
   return build_cplus_array_type (elt, build_index_type (size_int (n - 1)));
 }
 
-/* True iff T is a C++1y array of runtime bound (VLA).  */
+/* True iff T is a C++14 array of runtime bound (VLA).  */
 
 bool
 array_of_runtime_bound_p (tree t)
index fa3283d18bd84cd0be1096151a793ed6bf52926d..05fd48e372dc48035b358d7b1cd67f450e59aa72 100644 (file)
@@ -1154,7 +1154,7 @@ comp_template_parms_position (tree t1, tree t2)
 
   /* In C++14 we can end up comparing 'auto' to a normal template
      parameter.  Don't confuse them.  */
-  if (cxx_dialect >= cxx1y && (is_auto (t1) || is_auto (t2)))
+  if (cxx_dialect >= cxx14 && (is_auto (t1) || is_auto (t2)))
     return TYPE_IDENTIFIER (t1) == TYPE_IDENTIFIER (t2);
 
   return true;
@@ -1566,7 +1566,7 @@ cxx_sizeof_or_alignof_type (tree type, enum tree_code op, bool complain)
       return value;
     }
 
-  if (cxx_dialect >= cxx1y && array_of_runtime_bound_p (type)
+  if (cxx_dialect >= cxx14 && array_of_runtime_bound_p (type)
       && (flag_iso || warn_vla > 0))
     {
       if (complain)
@@ -5526,7 +5526,7 @@ cp_build_addr_expr_1 (tree arg, bool strict_lvalue, tsubst_flags_t complain)
 
   if (argtype != error_mark_node)
     {
-      if (cxx_dialect >= cxx1y && array_of_runtime_bound_p (argtype)
+      if (cxx_dialect >= cxx14 && array_of_runtime_bound_p (argtype)
          && (flag_iso || warn_vla > 0))
        {
          if (complain & tf_warning_or_error)
@@ -6348,7 +6348,7 @@ maybe_warn_about_useless_cast (tree type, tree expr, tsubst_flags_t complain)
       /* In C++14 mode, this interacts badly with force_paren_expr.  And it
         isn't necessary in any mode, because the code below handles
         glvalues properly.  For 4.9, just skip it in C++14 mode.  */
-      if (cxx_dialect < cxx1y && REFERENCE_REF_P (expr))
+      if (cxx_dialect < cxx14 && REFERENCE_REF_P (expr))
        expr = TREE_OPERAND (expr, 0);
 
       if ((TREE_CODE (type) == REFERENCE_TYPE
index dda8e91250cd689e55da3f38bc187bca2ebb56f7..83437830d509f2b31a802a454625c4088e61c7da 100644 (file)
@@ -1722,13 +1722,23 @@ The name @samp{c++0x} is deprecated.
 GNU dialect of @option{-std=c++11}.
 The name @samp{gnu++0x} is deprecated.
 
-@item c++1y
+@item c++14
+@itemx c++1y
+The 2014 ISO C++ standard plus amendments.
+The name @samp{c++1y} is deprecated.
+
+@item gnu++14
+@itemx gnu++1y
+GNU dialect of @option{-std=c++14}.
+The name @samp{gnu++1y} is deprecated.
+
+@item c++1z
 The next revision of the ISO C++ standard, tentatively planned for
-2014.  Support is highly experimental, and will almost certainly
+2017.  Support is highly experimental, and will almost certainly
 change in incompatible ways in future releases.
 
-@item gnu++1y
-GNU dialect of @option{-std=c++1y}.  Support is highly experimental,
+@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.
 @end table
@@ -2676,7 +2686,7 @@ When this option is turned off these suffixes are treated
 as C++11 user-defined literal numeric suffixes.
 This is on by default for all pre-C++11 dialects and all GNU dialects:
 @option{-std=c++98}, @option{-std=gnu++98}, @option{-std=gnu++11},
-@option{-std=gnu++1y}.
+@option{-std=gnu++14}.
 This option is off by default
 for ISO C++11 onwards (@option{-std=c++11}, ...).
 @end table
@@ -5510,7 +5520,7 @@ call into a diagnostics message call instead.  When reaching the
 @opindex fsanitize=vla-bound
 This option instructs the compiler to check that the size of a variable
 length array is positive.  This option does not have any effect in
-@option{-std=c++1y} mode, as the standard requires the exception be thrown
+@option{-std=c++14} mode, as the standard requires the exception be thrown
 instead.
 
 @item -fsanitize=null
index 9f40c35c15965b9d70dc8311f18757978d03f93a..e04f5b34e7c72e3fe8173f16bf554d12ef1aa7cb 100644 (file)
@@ -1,3 +1,148 @@
+2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
+
+       * g++.dg/cpp0x/cplusplus.C: New.
+       * g++.dg/cpp0x/cplusplus_0x.C: New.
+       * g++.dg/cpp0x/auto3.C: Change c++1y to c++14.
+       * g++.dg/cpp0x/auto41.C: Ditto.
+       * g++.dg/cpp0x/auto9.C: Ditto.
+       * g++.dg/cpp0x/initlist26.C: Ditto.
+       * g++.dg/cpp0x/pr59111.C: Ditto.
+       * g++.dg/cpp0x/trailing2.C: Ditto.
+       * g++.dg/cpp1y/attr-deprecated.C: Ditto.
+       * g++.dg/cpp1y/auto-dtor1.C: Ditto.
+       * g++.dg/cpp1y/auto-fn1.C: Ditto.
+       * g++.dg/cpp1y/auto-fn2.C: Ditto.
+       * g++.dg/cpp1y/auto-fn3.C: Ditto.
+       * g++.dg/cpp1y/auto-fn4.C: Ditto.
+       * g++.dg/cpp1y/auto-fn5.C: Ditto.
+       * g++.dg/cpp1y/auto-fn6.C: Ditto.
+       * g++.dg/cpp1y/auto-fn7.C: Ditto.
+       * g++.dg/cpp1y/auto-fn8.C: Ditto.
+       * g++.dg/cpp1y/auto-fn9.C: Ditto.
+       * g++.dg/cpp1y/auto-fn10.C: Ditto.
+       * g++.dg/cpp1y/auto-fn11.C: Ditto.
+       * g++.dg/cpp1y/auto-fn12.C: Ditto.
+       * g++.dg/cpp1y/auto-fn13.C: Ditto.
+       * g++.dg/cpp1y/auto-fn14.C: Ditto.
+       * g++.dg/cpp1y/auto-fn15.C: Ditto.
+       * g++.dg/cpp1y/auto-fn16.C: Ditto.
+       * g++.dg/cpp1y/auto-fn17.C: Ditto.
+       * g++.dg/cpp1y/auto-fn18.C: Ditto.
+       * g++.dg/cpp1y/auto-fn19.C: Ditto.
+       * g++.dg/cpp1y/auto-fn20.C: Ditto.
+       * g++.dg/cpp1y/auto-fn21.C: Ditto.
+       * g++.dg/cpp1y/auto-fn22.C: Ditto.
+       * g++.dg/cpp1y/auto-fn23.C: Ditto.
+       * g++.dg/cpp1y/auto-fn24.C: Ditto.
+       * g++.dg/cpp1y/auto-fn25.C: Ditto.
+       * g++.dg/cpp1y/auto-mangle1.C: Ditto.
+       * g++.dg/cpp1y/auto-neg1.C: Ditto.
+       * g++.dg/cpp1y/digit-sep.C: Ditto.
+       * g++.dg/cpp1y/digit-sep-neg.C: Ditto.
+       * g++.dg/cpp1y/digit-sep-cxx11-neg.C: Ditto.
+       * g++.dg/cpp1y/fn-generic-member-ool.C: Ditto.
+       * g++.dg/cpp1y/lambda-deduce-mult.C: Ditto.
+       * g++.dg/cpp1y/lambda-generic.C: Ditto.
+       * g++.dg/cpp1y/lambda-generic-cfun.C: Ditto.
+       * g++.dg/cpp1y/lambda-generic-dep.C: Ditto.
+       * g++.dg/cpp1y/lambda-generic-mixed.C: Ditto.
+       * g++.dg/cpp1y/lambda-generic-udt.C: Ditto.
+       * g++.dg/cpp1y/lambda-generic-variadic.C: Ditto.
+       * g++.dg/cpp1y/lambda-generic-vla1.C: Ditto.
+       * g++.dg/cpp1y/lambda-generic-x.C: Ditto.
+       * g++.dg/cpp1y/lambda-generic-xcfun.C: Ditto.
+       * g++.dg/cpp1y/lambda-generic-xudt.C: Ditto.
+       * g++.dg/cpp1y/lambda-init.C: Ditto.
+       * g++.dg/cpp1y/lambda-init1.C: Ditto.
+       * g++.dg/cpp1y/lambda-init2.C: Ditto.
+       * g++.dg/cpp1y/lambda-init3.C: Ditto.
+       * g++.dg/cpp1y/lambda-init4.C: Ditto.
+       * g++.dg/cpp1y/lambda-init5.C: Ditto.
+       * g++.dg/cpp1y/lambda-init6.C: Ditto.
+       * g++.dg/cpp1y/lambda-init7.C: Ditto.
+       * g++.dg/cpp1y/lambda-init8.C: Ditto.
+       * g++.dg/cpp1y/lambda-init9.C: Ditto.
+       * g++.dg/cpp1y/mangle1.C: Ditto.
+       * g++.dg/cpp1y/pr57640.C: Ditto.
+       * g++.dg/cpp1y/pr57644.C: Ditto.
+       * g++.dg/cpp1y/pr58500.C: Ditto.
+       * g++.dg/cpp1y/pr58533.C: Ditto.
+       * g++.dg/cpp1y/pr58534.C: Ditto.
+       * g++.dg/cpp1y/pr58535.C: Ditto.
+       * g++.dg/cpp1y/pr58536.C: Ditto.
+       * g++.dg/cpp1y/pr58548.C: Ditto.
+       * g++.dg/cpp1y/pr58549.C: Ditto.
+       * g++.dg/cpp1y/pr58637.C: Ditto.
+       * g++.dg/cpp1y/pr58708.C: Ditto.
+       * g++.dg/cpp1y/pr59110.C: Ditto.
+       * g++.dg/cpp1y/pr59112.C: Ditto.
+       * g++.dg/cpp1y/pr59113.C: Ditto.
+       * g++.dg/cpp1y/pr59629.C: Ditto.
+       * g++.dg/cpp1y/pr59635.C: Ditto.
+       * g++.dg/cpp1y/pr59636.C: Ditto.
+       * g++.dg/cpp1y/pr59638.C: Ditto.
+       * g++.dg/cpp1y/pr59867.C: Ditto.
+       * g++.dg/cpp1y/pr60033.C: Ditto.
+       * g++.dg/cpp1y/pr60052.C: Ditto.
+       * g++.dg/cpp1y/pr60053.C: Ditto.
+       * g++.dg/cpp1y/pr60054.C: Ditto.
+       * g++.dg/cpp1y/pr60064.C: Ditto.
+       * g++.dg/cpp1y/pr60065.C: Ditto.
+       * g++.dg/cpp1y/pr60190.C: Ditto.
+       * g++.dg/cpp1y/pr60311.C: Ditto.
+       * g++.dg/cpp1y/pr60332.C: Ditto.
+       * g++.dg/cpp1y/pr60376.C: Ditto.
+       * g++.dg/cpp1y/pr60377.C: Ditto.
+       * g++.dg/cpp1y/pr60384.C: Ditto.
+       * g++.dg/cpp1y/pr60390.C: Ditto.
+       * g++.dg/cpp1y/pr60391.C: Ditto.
+       * g++.dg/cpp1y/pr60393.C: Ditto.
+       * g++.dg/cpp1y/pr60573.C: Ditto.
+       * g++.dg/cpp1y/pr60626.C: Ditto.
+       * g++.dg/cpp1y/pr60627.C: Ditto.
+       * g++.dg/cpp1y/regress1.C: Ditto.
+       * g++.dg/cpp1y/system-binary-constants-1.C: Ditto.
+       * g++.dg/cpp1y/udlit-char-template.C: Ditto.
+       * g++.dg/cpp1y/udlit-char-template-neg.C: Ditto.
+       * g++.dg/cpp1y/udlit-empty-string-neg.C: Ditto.
+       * g++.dg/cpp1y/udlit-enc-prefix-neg.C: Ditto.
+       * g++.dg/cpp1y/udlit-userdef-string.C: Ditto.
+       * g++.dg/cpp1y/var-templ1.C: Ditto.
+       * g++.dg/cpp1y/var-templ2.C: Ditto.
+       * g++.dg/cpp1y/var-templ3.C: Ditto.
+       * g++.dg/cpp1y/var-templ4.C: Ditto.
+       * g++.dg/cpp1y/var-templ5.C: Ditto.
+       * g++.dg/cpp1y/var-templ6.C: Ditto.
+       * g++.dg/cpp1y/var-templ7.C: Ditto.
+       * g++.dg/cpp1y/vla1.C: Ditto.
+       * g++.dg/cpp1y/vla2.C: Ditto.
+       * g++.dg/cpp1y/vla3.C: Ditto.
+       * g++.dg/cpp1y/vla4.C: Ditto.
+       * g++.dg/cpp1y/vla5.C: Ditto.
+       * g++.dg/cpp1y/vla8.C: Ditto.
+       * g++.dg/cpp1y/vla9.C: Ditto.
+       * g++.dg/cpp1y/vla10.C: Ditto.
+       * g++.dg/cpp1y/vla11.C: Ditto.
+       * g++.dg/cpp1y/vla12.C: Ditto.
+       * g++.dg/cpp1y/vla13.C: Ditto.
+       * g++.dg/cpp1y/vla-initlist1.C: Ditto.
+       * g++.dg/ext/vector23.C: Ditto.
+       * g++.dg/ext/vla11.C: Ditto.
+       * gcc/testsuite/g++.dg/ubsan/cxx1y-vla.C: Ditto.
+       * g++.dg/warn/Wvla-2.C: Ditto.
+       * g++.dg/debug/dwarf2/auto1.C: Ditto.
+       * g++.dg/cpp1z/typename-tmpl-tmpl-parm-ped-neg.C: Ditto.
+       * g++.dg/cpp1y/cplusplus.C: Check for exact date.
+       * g++.dg/cpp1y/system-binary-constants-1.C: Check C++14 instead of C++1y
+       in error message.
+       * g++.dg/system-binary-constants-1.C: Ditto.
+       * g++.dg/cpp1y/cplusplus_1y.C: New.
+       * g++.dg/cpp1z/cplusplus.C: New.
+       * lib/target-supports.exp:
+       (check_effective_target_c++1y*): Rename to check_effective_target_c++14*
+       (check_effective_target_c++11_only): Call check_effective_target_c++14;
+       (check_effective_target_c++11_down): Ditto.
+
 2014-08-22  Marek Polacek  <polacek@redhat.com>
 
        PR c++/62199
index c2e5519ecf739ecf94373efc038d52a7d86671d9..5bfed1be3cbc3351dce926a4701fc4adb0a93e40 100644 (file)
@@ -19,7 +19,7 @@ A<int> A1;
 // CWG issue 625
 A<auto> A2 = A1;               // { dg-error "" }
 
-auto foo() { }                 // { dg-error "auto" "" { target { ! c++1y } } }
+auto foo() { }                 // { dg-error "auto" "" { target { ! c++14 } } }
 
 void bar(auto i)               // { dg-error "incomplete|auto" }
 {
index b2a77550fda79640a81a2a3b91765582c0fc572e..b1551e2e5805119fe88ec629fc7bcb3611e43808 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/58550
 // { dg-do compile { target c++11 } }
 
-auto foo();                    // { dg-error "auto" "" { target { ! c++1y } } }
-auto fp = foo;                 // { dg-error "auto" "" { target c++1y } }
+auto foo();                    // { dg-error "auto" "" { target { ! c++14 } } }
+auto fp = foo;                 // { dg-error "auto" "" { target c++14 } }
index 205bb960cc9d892237ace6386810e47c07c3c040..0c0f39f02c65c6f350e0e5a56a60a1f1aa89ee3e 100644 (file)
@@ -15,13 +15,13 @@ const std::type_info &t2 = typeid (auto *); // { dg-error "auto" }
 
 struct A
 {
-  operator auto ();                            // { dg-error "auto" "" { target { ! c++1y } } }
-  operator auto *();                           // { dg-error "auto" "" { target { ! c++1y } } }
+  operator auto ();                            // { dg-error "auto" "" { target { ! c++14 } } }
+  operator auto *();                           // { dg-error "auto" "" { target { ! c++14 } } }
 };
 
 struct A2
 {
-  operator auto () -> int;                     // { dg-error "invalid use of" "" { target { ! c++1y } } }
+  operator auto () -> int;                     // { dg-error "invalid use of" "" { target { ! c++14 } } }
   operator auto *() -> int;                    // { dg-error "auto" }
 };
 
@@ -98,8 +98,8 @@ baz (int i, ...)
 template <typename T = auto> struct E {};      // { dg-error "invalid use of" }
 template <class T = auto *> struct F {};       // { dg-error "invalid use of|expected" }
 
-auto fnlate () -> auto;                                // { dg-error "invalid use of" "" { target { ! c++1y } } }
-auto fnlate2 () -> auto *;                     // { dg-error "invalid use of|expected" "" { target { ! c++1y } } }
+auto fnlate () -> auto;                                // { dg-error "invalid use of" "" { target { ! c++14 } } }
+auto fnlate2 () -> auto *;                     // { dg-error "invalid use of|expected" "" { target { ! c++14 } } }
 
 void
 badthrow () throw (auto)                       // { dg-error "invalid use of" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/cplusplus.C b/gcc/testsuite/g++.dg/cpp0x/cplusplus.C
new file mode 100644 (file)
index 0000000..b2f0ccd
--- /dev/null
@@ -0,0 +1,5 @@
+// { dg-do compile { target c++11_only } }
+
+#if __cplusplus != 201103L
+#error "__cplusplus != 201103L"
+#endif
diff --git a/gcc/testsuite/g++.dg/cpp0x/cplusplus_0x.C b/gcc/testsuite/g++.dg/cpp0x/cplusplus_0x.C
new file mode 100644 (file)
index 0000000..6ba2a6c
--- /dev/null
@@ -0,0 +1,6 @@
+// { dg-do compile }
+// { dg-options "-std=c++0x" }
+
+#if __cplusplus != 201103L
+#error "__cplusplus != 201103L"
+#endif
index 81d304f0e9ea87fa17cb9ed3c4c28442b82a751b..260ddd48f5e6dfe2113ee680834b7f8abc45b5d9 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/42059
 // { dg-do compile { target c++11 } }
-// { dg-options "" { target { ! c++1y } } }
+// { dg-options "" { target { ! c++14 } } }
 
 void
 foo (int i)
index 4e48854418fa383180dc07d5b165f3e0d4cfcf6f..62d8e8f86ec95cacec5c3d42b01ae4c7c7506015 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/59111
 // { dg-do compile { target c++11 } }
 
-auto& foo();   // { dg-error "type specifier without trailing return type" "" { target { ! c++1y } } }
+auto& foo();   // { dg-error "type specifier without trailing return type" "" { target { ! c++14 } } }
 int i = foo(); // { dg-error "" }
index 888d6f958f11efd75dbbb2917b70401108114fb0..bfc2712a74a2ac94a3590b3c27030e97ee736437 100644 (file)
@@ -3,14 +3,14 @@
 // { dg-do compile { target c++11 } }
 
 auto f1 () -> int;
-auto f2 ();            // { dg-error "without trailing return type" "" { target { ! c++1y } } }
+auto f2 ();            // { dg-error "without trailing return type" "" { target { ! c++14 } } }
 int f3 () -> int;      // { dg-error "trailing return type" }
 auto *f4 () -> int;    // { dg-error "trailing return type" }
 
 struct A
 {
   auto f5 () const -> int;
-  auto f6 ();          // { dg-error "without trailing return type" "" { target { ! c++1y } } }
+  auto f6 ();          // { dg-error "without trailing return type" "" { target { ! c++14 } } }
   int f7 () -> int;    // { dg-error "trailing return type" }
   auto *f8 () -> int;  // { dg-error "trailing return type" }
 };
index 698268a776873f91e3b02d3a4f3c9aa2c1465b82..ec6f232b85863bd9a4660efc7c870645c8a4394d 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 class [[deprecated]] A
 {
index 0a109fe8a1cbc4ebc1a5879a80c1bc2f55cbde7a..9d90a0f20224ac8fec1e0bb53e152ef63d724ea6 100644 (file)
@@ -1,5 +1,5 @@
 // DR 1586
-// { dg-do run { target c++1y } }
+// { dg-do run { target c++14 } }
 
 template <class T>
 void f (T* p)
index 7a5b4908adc5b71e30316d5a389992c726ca9bdc..0df09ab7ab174cd3a0e95149431c0c7a61f128b6 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 constexpr auto f() { return (char)42; }
 #define SA(X) static_assert ((X),#X)
index 890cfda1205a6aa71f0e56f9ada8acc8fe9ad4d6..8e08911465db66023a51a5ba2ce1aa58aeea3c61 100644 (file)
@@ -1,6 +1,6 @@
 // A template declared with auto should be declared with auto in an
 // explicit instantiation or explicit specialization, too.
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 template <class T>
 auto f(T t) { return t; }
index 132f959db2987636d330fc882eedf66812846ec1..b6a4b324b7c08cb4d649f1c54a1cdb40dc47f715 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 auto f() { return; }           // OK, return type is void
 auto* g() { return; }          // { dg-error "no value" }
index 04ea81929d3faa1a01ff002032cc07d05f1221f4..224f2789bcd8f98811c13f553ac9e3660b9a5671 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-final { scan-assembler "_ZN1AIiEcvDaEv" } }
 
 template <class T>
index 8f4e105019f5b13b510938cf93ac26fc22fca590..96b4b0c64aadd45a45e57270fe5bfd26a23a0967 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 struct A {
   template <class T>
index f17c0e289c3c1012c69ffac285a73096ac550524..d82b21fc960fbc742ee65c87198ec413d9da9d0f 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/56177
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 auto f ();
 auto f () { return 33; }
index 987aa96b7bba7d13a89ef4ebc34da346726feca3..ba9f3579f625054aa28a6d1becc6de0f018aa4ba 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "-Wno-return-local-addr" }
 
 template<class,class> struct same_type;
index 233f26f8118e0113db19aa8575480baa92023f34..46177239ddce2ae5cd2b3e34d577658b1da28c25 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 template<class,class> struct ST;
 template<class T> struct ST<T,T> {};
index ee668b626a1fa196d6aef94c9970bab29edad9b0..1647107e54a0240222b2eb95cdb36b43b1a5d253 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do run { target c++1y } }
+// { dg-do run { target c++14 } }
 
 int c;
 int d;
index ca1b0b033795c85655663266e9f0f8937266b4e0..528d3d45ed7a0dee7d2cfd57e1a27257731f4955 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 struct A
 {
index ecd8b91e885526669fb87db600f6084ffa1ccde3..28cea1128669bddbf459e97d0d0c9987b48d6189 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 template <class T>
 auto f() { return T::i; }
index f89c86ce3139ee66c9e26ecfccd3e7a1127d4343..0d39551ff2c75ac1b4229d9ce157c63be37f7197 100644 (file)
@@ -1,3 +1,3 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 auto f() { return f(); }       // { dg-error "auto" }
index 818b6f5da67e7a47aa80e78125b63891b65bed22..a516bcfb0e84cdad033b74816331c780fdc8ca1f 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 template <class T>
 auto f(T) { return 42; }
index df23a81486d219fd724b964936671a69653b60b4..4db1c86c8d90432abd76ce1938c249067297ab17 100644 (file)
@@ -1,5 +1,5 @@
 // N3638: decltype(auto) must stand alone
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 void f();
 decltype(auto) g1() { return &f; }
index 0077b89e4cdafdc5bc554f5d033777f83f5445cb..b16a7644c0f8146b4b9f61e7b7504e8c5c11c212 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 struct A
 {
index f153e2a7fa197333766cf97d5193d0ded8cc3ba4..896318ceb0a52f3feeb19158b9d64b62e599131c 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/58561
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "-g" }
 
 auto foo();
index dfff2029c1dab053ce8a4b395c43e52c447d0a91..e9bbc735b4da77f06751c4261491e3ad502d90a2 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60314
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "-g" }
 
 // fine
index 24680f16d05c24ef1f7c745218a0111efc36408d..fdad4653560f7de3a37191472454dcb0584d3d4e 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60574
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-require-effective-target lto }
 // { dg-options "-flto" }
 
index 73ec5a7c8d2841fc119b2e998e2a315d71c21970..4436e84bcd3e801ab7b9e0d507926df0cd0fc16e 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 bool b;
 auto f()
index 4c3227a0e1fdd3a7a2781cb7a9f79b9c96e3bc3f..c2e1893523c378907788ca4f45f1fccde6bce4ad 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 template <class T>
 constexpr auto f(T t) { return t+1; }
index b857140026308f6ff9b52a83f57751e3b22ee43a..17ce4d291249b9129dd192582a86ca60f270374a 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do run { target c++1y } }
+// { dg-do run { target c++14 } }
 
 int i;
 auto& f() { return i; }
index 123132ddf0c4fb68249e990b04ff6dd2e7f0ae62..17ca6f22c50e361a82326ec924900b5390aa5fe6 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 template <class T, class U> struct ST;
 template <class T> struct ST<T,T> {};
index deb664c3bd8b8540fbd1d14af7c1c80dfe80784e..3bef5987ac226c49d7c6eeada7f1e364e88fd218 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 auto f();
 
index 1badd6a5e81e19aeae455177fc9952d5ba1482c3..651c66cb297a539a446cc1dea26e60760860a56a 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 auto f() { return 42; }                // { dg-message "old declaration .auto" }
 auto f();                      // OK
index 018d42cce6b120d9f30cd0a6c029b5f723382cd7..54cfa0de4e88700704a765b2c333fa9cf1a7825a 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-final { scan-assembler "_Z1fIiERDaRKT_S1_" } }
 
 template <class T>
index 0ea437ca460f8b55ab9e0a64c1efe402bbcc63d3..0cb44599ff2c5b434447c118576b3105d0380975 100644 (file)
@@ -1,5 +1,5 @@
 // Mangling for decltype(auto)
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 void f();
 
index a6f31f63def3c699e562f79534a511a66af557a0..e1973e5d9a441fa6ca84e7439e24aa173bcbfd1e 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60312
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 template<typename> struct A;
 
index 2cfd84fada08cc23d70786b839c458d4f576c2d2..7c07d6c8b0315289ff499f073b66a3d2d75636cf 100644 (file)
@@ -1,5 +1,5 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14_only } }
 
-#if __cplusplus <= 201103L
-#error
+#if __cplusplus != 201402L
+#error "__cplusplus != 201402L"
 #endif
diff --git a/gcc/testsuite/g++.dg/cpp1y/cplusplus_1y.C b/gcc/testsuite/g++.dg/cpp1y/cplusplus_1y.C
new file mode 100644 (file)
index 0000000..0e8f3ee
--- /dev/null
@@ -0,0 +1,6 @@
+// { dg-do compile }
+// { dg-options "-std=c++1y" }
+
+#if __cplusplus != 201402L
+#error "__cplusplus != 201402L"
+#endif
index 453fe106a2498d997732ada587a3819339bf98ae..411ba52b5238b6c4008f6f7541471347d529d1d2 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target { ! c++1y } } }
+// { dg-do compile { target { ! c++14 } } }
 
 #define assert(E) if(!(E))__builtin_abort();
 
index 377228cf4b51364cc5932af3ad909d3c78343983..3d4c616ccb1c90e5866758d7d12ff7ac6fae8151 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 int
 main()
index cc670fe06dbec51b6eec1e378836d286c5f9f6f8..111e7a55d79dd52321e5e5d983958a6b44b4e76d 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 #define assert(E) if(!(E))__builtin_abort();
 
index 1d7c812d067650341bf1d60eeb82f9a832f2872f..60ac52eff5bba671a3285ac8adf6b543e33c6edf 100644 (file)
@@ -1,5 +1,5 @@
 // Out-of-line generic member function definitions.
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 struct A {
index 478d6a50bab423f170ee20ad29e255ee5af6ea25..f1c7ba9482594a69c2bb775a06f5df1d552b3d73 100644 (file)
@@ -1,7 +1,7 @@
 // Testcase for an extension to allow return type deduction when the lambda
 // contains more than just a single return-statement.
 
-// { dg-do run { target c++1y } }
+// { dg-do run { target c++14 } }
 
 bool b;
 template <class T>
index 0069a6eaed99f8abd18b0ee78c811ab2e4a3741e..dd64d560cc01e9ee0810f322ddb676e659571cd2 100644 (file)
@@ -1,5 +1,5 @@
 // Generic lambda conversion to function ptr test from N3690 5.1.2.6
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 void f1(int (*)(int)) { }
index c22bb97ecaf8270b4b2017892508221bfcf24c85..dbf8b70f862a76f6c775dad7ee7520d4613e1eb5 100644 (file)
@@ -1,5 +1,5 @@
 // Generic lambda type dependence test part from N3690 5.1.2.12
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 void f(int, const int (&)[2] = {}) { } // #1
 void f(const int&, const int (&)[1]) { } // #2
index 3e67ebd16f6dd44bf2db85236a27eea4d51fbdcb..59b5ccaa957bd87b84fd33392434dc855cf2a5c4 100644 (file)
@@ -1,5 +1,5 @@
 // Mixed explicit and implicit generic lambda test.
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 int main()
 {
index f0e9a5bbe65a03335b03f31bcc131347b03061e7..3597fa8053a4b0e5fba75fa645324f6b560d1751 100644 (file)
@@ -1,6 +1,6 @@
 // Ensure that generic lambdas properly construct and destroy user types.
 // { dg-options "-DUSE_AUTO_SYNTAX" }
-// { dg-do run { target c++1y } }
+// { dg-do run { target c++14 } }
 
 int i = 3;
 
index 7065ac606f7ae5e77e7a5983d39ed3e7633dc061..6d2d250f393c4155ee73a93c928961573462f857 100644 (file)
@@ -1,5 +1,5 @@
 // Basic generic lambda test
-// { dg-do run { target c++1y } }
+// { dg-do run { target c++14 } }
 
 template <typename T, typename U> struct pair {};
 template <typename... T> struct tuple {};
index f646b85b5b076371c9fe617f881c6dc13a3bc9ba..90407da97c537db2fe3c0e020edbd1a47db04ebe 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/59271
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 extern "C" int printf (const char *, ...);
 
index b722aa7b23b6b5d467796611471e2cb1f283cc92..5334091ef5f0e2e30d02b97698faebaf21d939d5 100644 (file)
@@ -1,5 +1,5 @@
 // Explicit generic lambda test from N3690 5.1.2.5
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 #include <iostream>
 
index fbd74220d40a7b507925f09239f66e448789cbb9..d8f5ec15aed13159f5291e0807256d5b7e700d85 100644 (file)
@@ -1,5 +1,5 @@
 // Explicit generic lambda conversion to function ptr test from N3690 5.1.2.6
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 void f1(int (*)(int)) { }
index f6e9e5bffc603d4d636a06d6ec40977933baf8f6..b3492dd85d3e4ea054b4a9d3f631317d14e4676e 100644 (file)
@@ -1,5 +1,5 @@
 // Ensure that generic lambdas properly construct and destroy user types.
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "-DUSE_EXPLICIT_TEMPLATE_SYNTAX" }
 
 #include "lambda-generic-udt.C"
index 9721e87d96b8a50588b34928427b995bc4876f5c..9bd744c362c148ff429e338f19c654dcd8a6b2ae 100644 (file)
@@ -1,5 +1,5 @@
 // Generic lambda test from N3690 5.1.2.5
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 #include <iostream>
 
index f9a80059bd5d8fb3e6f0a723c58d3b1f6096ff67..b474893be8cee44cf63b718080bb57472a93ee5a 100644 (file)
@@ -1,5 +1,5 @@
-// Test for the explicit initializer extension of C++1y
-// { dg-do compile { target c++1y } }
+// Test for the explicit initializer extension of C++14
+// { dg-do compile { target c++14 } }
 
 int main()
 {
index 252546414199fffa083f2243cef940a8871a2caa..e9105fc12978a441042dd912b363bb4b5ec31f4b 100644 (file)
@@ -1,6 +1,6 @@
 // N3648: capture init
 // { dg-options "-w" }
-// { dg-do run { target c++1y } }
+// { dg-do run { target c++14 } }
 
 int main()
 {
index 83ec57e67576d9d4185e83bf14df622e283fa961..e4f31cfa2da248d04e886e90226a0dc87c10cba9 100644 (file)
@@ -1,5 +1,5 @@
 // N3648: redundancy and capture init
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 int main()
 {
index 43372284679fa682c449f68794f582a453030173..49ebde7ff6beda778a1e0aec5e743a9c3268f608 100644 (file)
@@ -1,6 +1,6 @@
 // N3648: capture init at non-block scope
 // { dg-options "-w" }
-// { dg-do run { target c++1y } }
+// { dg-do run { target c++14 } }
 
 int i = 42;
 int j = [x=i]{ return x; }();
index 0affb31bd5eda78c86229bb1dc309759c66c1b54..787ffc0476d6d8e96409703802d20b137a58966a 100644 (file)
@@ -1,5 +1,5 @@
 // N3648: capture init example from paper
-// { dg-do run { target c++1y } }
+// { dg-do run { target c++14 } }
 
 int x = 4;
 auto y = [&r = x, x = x+1]()->int {
index b136f45ea7b3cf127458ab6f872202b889a2ab59..5976de0f0732ca18c72c01b35978695dd94e7cb2 100644 (file)
@@ -1,5 +1,5 @@
 // Test for paren and brace initializers
-// { dg-do run { target c++1y } }
+// { dg-do run { target c++14 } }
 
 #include <initializer_list>
 
index e2530004f5cf91d8526636ef10354b5abf752347..d6c1587487d44fd8a1a4ea19cb703b2df488ea90 100644 (file)
@@ -1,5 +1,5 @@
 // Test that captures are not named in the closure type.
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 int main()
 {
index 224cd1a61bfcc7f71533d156c5186a2414ad0c90..c943c48dfb039ac30da7ce120f03e5b81ad61030 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/59349
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 int foo () {
   [bar()]{};                   // { dg-error "empty initializer" }
index 3a61b74eaedbd7bc20f236b6b4e7710b5ff443a4..21933bd3e1b1e2acce7fffec5514a292a4d30cd6 100644 (file)
@@ -1,5 +1,5 @@
 // DR1760: "no additional copy and destruction is performed"
-// { dg-do run { target c++1y } }
+// { dg-do run { target c++14 } }
 
 #include <cassert>
 
index c13a3d9e09ec2ced031058cf7179ce1ba73f5102..a86f03e0f1d592f049b6b36de81775fd2aea67ac 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 void f()
 {
index 0642f147984b5e89901bf7c5938201a910b322fd..092b2fa76840b967a0aeabb48ecee16e21356f07 100644 (file)
@@ -1,5 +1,5 @@
 // Test that the parens don't show up in the mangling
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "-Wno-return-local-addr" }
 // { dg-final { scan-assembler "_Z1gI1AEDTdtfp_1iET_" } }
 
index b9debe1455d51ac2a8315b65d8877f646ba4f755..0c76a08aecc15324ec5bab1dbe0123f9203d0a94 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 #include <chrono>
 
index 080572168dde73350c59be2cb64a4e3c71260de2..ec595a21b7d1c1d0a0ca731f7831f0b9dada03dd 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 struct Foo
 {
index ec7d564b4bd15cfa88eaa62e622be62097794a74..bb68cbc1999d85618bf9acb7aa2c80bbdd657493 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/58500
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 struct A {};
index 34d43aabdcbb29f16d2add104b66328be69036ff..c8a93d3388dc0b9623311069bdad0fac60f40d18 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/58533
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 void foo()
 {
index dd5073182c7ce0cb93a6790c351e6c6329b8f301..e38e1f3f66795cf6e24a7a42e7d750c7538ab23b 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/58534
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 template<typename> void foo(const auto&) {}
index e0718480b3b75635e97b321a6ab0257b37b3e058..b36be8f4a452f1b36c5ecaf474569285eb218b56 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/58535
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 struct A
index 05c00b362d5a3170c6b4953ccf4104fe97a75541..a4b6f553efdfe53180ec70bb9b9e4fe2b1c7cf4c 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/58536
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 struct A
index 122b96f500d2c1c29271caeb959c6faec2da5606..6a78de46c3f11e605e034d3c4443dbcb2a786db8 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/58548
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 void foo(auto)
index 1b54af4a67555dfdab95c92620a801883635b187..2f76399d8dd22787ac7c270fc89962bf0a007321 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/58549
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 void foo(auto)
index ecc92581140dce37dc02b0464e64cf720d9776ce..caa60af6306d3ea3680c52437708fc534cb7bdd1 100644 (file)
@@ -1,4 +1,4 @@
 // PR c++/58637
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 template<> void foo(auto); // { dg-error "auto|not a template" }
index 226b318f6501a35471ceee780bfacfdd377bb22b..6fc374f1e56a55035121142326f194a776f5b849 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do run { target c++1y } }
+// { dg-do run { target c++14 } }
 
 template<typename, typename>
   struct is_same
index c78d645cc34c2c9eefa51709f4baf7d48a9ec926..dba9cea0dc2f884d1f5e5e180056c9ea7939ace4 100644 (file)
@@ -1,4 +1,4 @@
 // PR c++/59110
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 int i = *(auto*)0; // { dg-error "" }
index bc9d99eb3f4e81e76c5a1a6862da507ae3e40603..fc67e3820d1eaa2a0d68af44ae00a589a53717e1 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/59112
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 void foo()
 {
index 8d2bf7fbf7c3504eeec231b23335ecdbc5ccc3ba..3d7dd61ac94cb1f8f645d3f8e805e68ec6a790e2 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/59113
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 void foo()
 {
index b6e561f2e016d050ef9b966f181197b2867618a4..f66e64eb6a2efcdd491d3e0df2a4128b5e8fd39a 100644 (file)
@@ -1,4 +1,4 @@
 // PR c++/59629
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 void foo(int i = []{ auto 0; }()); // { dg-error "expected|could not convert" }
index 80d9f4de43c0645c5363b9332ef66525ddb08691..9af99397dc7626f372ae08ba097007744ab4fbd0 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/59635
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 auto f = [] (auto, ...) { return 0; };
 
index 6128753e08e6ff304308a4f1e60ac950cdbf7290..847cecdf5a5b9bc85d1d7d7c0ede5105a47eef0e 100644 (file)
@@ -1,4 +1,4 @@
 // PR c++/59636
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 auto f = []() { return []<>() {}; };  // { dg-error "expected identifier" }
index ce90483ce8c619cde42eb021750bd56ad239fac6..a34b65718654e206ee65303f9b8e489fbd817089 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/59638
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 void (*a)(auto);         // { dg-error "" }
index 0cc33db01386d6832faf0658fdf9b76e34ddd3df..2c4f1d046bf30099e74efa85b7b01d9643975f62 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/59867
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 using namespace std;
 
index f918d33fddd9985644aec6d512f5c74b8d75f916..c083facb43afae66fed245047fd2948e2b6ff6ed 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60033
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 template <typename... T>
 auto f(T&&... ts)
index 6ac772020459b6692390898ab82fc9286c4653d2..25d20acdf84a1159b19bbf98ec033cdaa4036b22 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60052
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 struct A
index 846039052f882712ca11fa122e98d417df11c179..a8f5ba1ca3f4007ce7227ab3c9846f7c31820687 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60053
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 struct A
index 6b5179ac7dd3a1e0d52939c55bc9a4b4be6a4a82..f51120f6425149bbe824ca596b6b0302c5e950aa 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60054
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 template<typename T> T fooA(T);
 template<typename T> decltype(T{}) fooB(T);
index e61704e8ecd9cccd94dc2ba6d2af2ad366a02f48..add3f05cbbd6d9a8c8c5bd8b21008e542c9ca9dc 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60064
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 class A
index 2cf8da12bc77cbe57d2e1c4881e8a248099e6d1d..56505b7bc04068b1aac3c4d4c35fefc9ed44f516 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60065
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 template <int> void foo(auto... x);
index 9a5b484a667045fe5dee1d39286b39ab6eeb6d53..9e439ceb9eae6fa2f1b3b7b411451e89e9cf0014 100644 (file)
@@ -1,4 +1,4 @@
 // PR c++/60190
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 auto f = []<int>() -> int() {}; // { dg-error "returning a function|expected" }
index 001e99327e6666c1cc07076c0e68c07c1e220ff6..6d32831f86644c0398d1b6ac66f95ebed3beb4b4 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60311
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 template<void(*)(auto)> struct A {}; // { dg-error "auto" }
 
index c0a67a9f6cdb00c52dc3e2c670a1809477db1400..e75ab8584e3337c8e72269abd940b2e8f2157ac2 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60332
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 void foo();
 
index 51d088a2a95eba262c46c3ad513843e46715af46..9585dd2ca7701f0cc9720c17fb054ab0411bcaf7 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60376
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 struct A
 {
index 6d1d416ec8b5d5582a79384e794d3828052eb1b0..ab35ba9b1729f319ec8ac7f03b25dc5cdeb65bd6 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60377
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 void foo(auto, void (f*)()); // { dg-error "expected" }
index f206647e6408c21b4ece8080ac421091b58c63a7..44806cd69e629f96614a0cba3618ea5d9c13395d 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60384
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 template<typename> int foo();
 
index 5cd5539f82e81bb92cd87592ef5fc686d34958d6..38d0e4bd6cd333b7c57a14697fbcbe1e8058b357 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60390
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 struct A
index 68746aedf39f943b347aefe14108edbc126193ae..7e3570498bcd650792224240b4d9795afd19bdc1 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60391
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 namespace N
index 8e89be499355c41a3be549dba81e8d488fa8ba2c..27fe2b722960f7ab424b541e948778f74ac4d1e4 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60393
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 void (*f)(auto) + 0; // { dg-error "expected" }
index 2f607071c4fdcc3720fd33012d6187a2da215515..da730f80f06002f3f8eecec8171f31fb13fcbc1f 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60573
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 struct A
index 314d6dacf10fba4a5dbcbeb1da5598d4cd903900..686db7306b932a69691b0414a9737047a3756d8a 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60626
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 struct A {};
index 9e2116e9cb5b970d8cee7521c2bdd885e719912d..64eb635922103784ef24fa504b8a14a6a4f4f5f3 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60627
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "" }
 
 template<typename T> void foo(T) {}
index 5bb804258eb842390c8eed66537943254eb67a13..d4566d0a216fc2bb00dce0244258b0db786619ff 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60409
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 struct A
 {
index 951fa3c5f19febb6bcef9db963c2103dcf8ec917..ec2d5858ea82899832968fe6f5065269074e2200 100644 (file)
@@ -1,5 +1,5 @@
 // Origin: Dodji Seketeli <dodji@redhat.com>
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 #include "../system-binary-constants-1.h"
 
@@ -9,5 +9,5 @@ foo (void)
 #if BINARY_INT_CONSTANT_IN_SYSTEM_HEADER
   return 23;
 #endif
-  return 0b1101; // { dg-bogus "binary constants are a C..1y feature or GCC extension" }
+  return 0b1101; // { dg-bogus "binary constants are a C..14 feature or GCC extension" }
 }
index c99b2f7278eada6086f849b733a69539349600fb..e77ea45890d52f67e4f95d0d18b3c070ea3ad973 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target { c++11 && { ! c++1y } } } }
+// { dg-do compile { target { c++11 && { ! c++14 } } } }
 
 template<typename CharT, CharT... String>
   int
index d6b44d9c0f060fe4ee6c64d5270cd3ffd6015232..989b9babd1f61052494552ca01727fd2b5c70d8d 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 template<typename CharT, CharT... String>
   int
index 4f1a34a5cdcb9e1a3a0a631d35d99a16c556f935..1b7f4fa2559e427a500c108b5b7a0ab0fc975044 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 int
 operator "*"_s(unsigned long long) // { dg-error "expected empty string after 'operator'" }
index 51def3aca39e6a2f843c987f70ed7f3dbc28ee42..039ab2fb45178b7ddcf446c37a02f60519bd2438 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 int
 operator L""_Ls(unsigned long long) // { dg-error "invalid encoding prefix in literal operator" }
index f6c3baec922e2dde8798b8b085ed2510ab12cf0e..cad4a1dfc6642021dfcb9b650c79a0be779b383c 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 #include "complex_literals.h"
 
index 9219303737cd93bcaebab3698eb587ca21935cd5..856198a109740bcc08d03d84368a2845ee7beb3f 100644 (file)
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++1y" }
+// { dg-do run { target c++14 } }
 
 template<int A, int B>
   struct S1
index 315ac3e048a00b0ef97ba6c9856e4cef2eaf4561..c734f413145281fedd9dd043bae2499716cebaea 100644 (file)
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++1y" }
+// { dg-do compile { target c++14 } }
 
 // Template variables and static member variables of template classes are
 // often confused.
index d3fbad4bc88a315dc1843e5cda7288e1517510d8..52ef6688a73974ad16bb36f59fc20f175e1cf93c 100644 (file)
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++1y" }
+// { dg-do run { target c++14 } }
 
 template<typename T>
  constexpr int var = sizeof (T);
index 1d6cf1d69182f3ec47a87610828710543cd69102..4ad7be68c5cfa74befd6fc9e642ea578cd0788a9 100644 (file)
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++1y" }
+// { dg-do run { target c++14 } }
 
 template<typename T>
   constexpr int var = sizeof (T);
index a8b7122ddd8a260639e1c7ea5381ede89834d569..a10f3888b6e7f5bce5f6ece7420cd9acf267a4cd 100644 (file)
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++1y" }
+// { dg-do run { target c++14 } }
 
 template<int A, int B>
   struct S1
index 2125d6c9487ecc825c045f1687f35f972d9ee8be..23ebfbe74f813350f0e9cf3b62658a30cfcfe8cc 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++1y" }
+// { dg-do compile { target c++14 } }
 
 template<typename T>
   constexpr bool Class = __is_class(T);
index 1e59cf42738c34f88c0ed48d6c01df189b0a981b..07453af796c86c83f1161e854ed7733231a028c7 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 template <class T> T var = 0;
 
index b642ed41580a91996556044d286046dea0fe32bb..7b7aa9265325f340f07e8c88f6719f533a5f6f31 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do run { target c++1y } }
+// { dg-do run { target c++14 } }
 
 #include <initializer_list>
 
index 5708cf84e2f391c9dfe6674f13b22d6705ed3a96..cea17ef73754547f6942cdfb0f349def74548de9 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 #include <typeinfo>
 
index c3f71b5c20659e4fcb6f7720527b4865052d1507..38fb145ae20f244c34ab93b1d115cd167be6cbdf 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/57402
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 int i = 2;
 
index c84b0bbb9afbcebdc99a8347344fc812234133cc..ca2263528794c00204be622fb91c379a5b5342a7 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60251
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 void foo(int n)
 {
index d605e72a482ca252220f899c0fd1648d382e3403..7fc9987367cf16eab34fa4d80d0c4a5b30d3f067 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60250
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 template<typename> void foo()
 {
index 9b69452d1d66bcde6490393306a0471f3319b640..f5dab26c62158544e2d62f0b2c405d17601b3fe9 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/60227
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 void foo(int n)
 {
index 6aa5fcfe955d4567ac2cd1b99c3b2b7a40b44e19..c9a452d9512a5b8c558ab65fdb7e57952e1496fc 100644 (file)
@@ -1,5 +1,5 @@
 // N3639 allows initialization and capture of VLAs
-// { dg-do run { target c++1y } }
+// { dg-do run { target c++14 } }
 
 void f(int n)
 {
index 75470365a77907ca3e02de5aa3d9ef299b56f32d..a3d8adb05c95149de8258dc5b6eff06e7ae6a4cf 100644 (file)
@@ -1,5 +1,5 @@
 // Test for throwing bad_array_length on invalid array length
-// { dg-do run { target c++1y } }
+// { dg-do run { target c++14 } }
 
 #include <new>
 
index 9de1d28fef1c0df7afb547d92e9b41eb6129baf9..29df98c7ce45f6af89f02e5c76fc9bbdc86e5fdc 100644 (file)
@@ -1,5 +1,5 @@
 // Test for range-based for with VLAs.
-// { dg-do run { target c++1y } }
+// { dg-do run { target c++14 } }
 
 #include <new>
 
index 5f0dfdf3024192453830d148e1b431a2dca5b903..cc67a75b5dc1e1759285877b9708f1b6a9af3491 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/55149
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 void test(int n) {
   int r[n];
index 5077ae343f9754433d446d8cb4d2784c911a57ff..2c821e14c46b23c9c162c47c1a29569750d5b25c 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/55149
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 template<unsigned int TA>
  struct SA
index 5f49d11e9137eeb9ab79dcba401f0bdcae35e89f..eb58e1a01f827bbd28ff9a0557e217bd7bbb95e7 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/57408
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 
 template<typename Callable>
   struct Impl
diff --git a/gcc/testsuite/g++.dg/cpp1z/cplusplus.C b/gcc/testsuite/g++.dg/cpp1z/cplusplus.C
new file mode 100644 (file)
index 0000000..e4b84fd
--- /dev/null
@@ -0,0 +1,6 @@
+// { dg-do compile }
+// { dg-options "-std=c++1z" }
+
+#if __cplusplus <= 201402L
+#error "__cplusplus <= 201402L"
+#endif
index 48cb8ab0892e8108c17a8af50d3daa748ee1b5d2..abd118b633ae0ea159c35e9d374c3af8494ff81a 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-do compile { target c++1y_down } }
+// { dg-do compile { target c++14_down } }
 // { dg-options "-pedantic" }
 
 template<typename T>
index aef29ee5d958390a1485ce5989492145baf2276d..e38334bd23bbefd3bcd690253ed43f5314a57cac 100644 (file)
@@ -1,5 +1,5 @@
 // PR c++/53756
-// { dg-do compile { target c++1y } }
+// { dg-do compile { target c++14 } }
 // { dg-options "-g -dA -fno-debug-types-section" }
 // We're looking for something like
 
index 461d8a9e969973f0de60c5023a5a7e5310e6d4d8..a50b2860e8b8e76c45c5faed9d14da34666386f8 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target c++1y } } */
+/* { dg-do compile { target c++14 } } */
 /* { dg-options "-Wsign-conversion" } */
 // Ignore warning on some powerpc-linux configurations.
 // { dg-prune-output "non-standard ABI extension" }
index e448be325fb4a831997fc41520b1bd15ff314569..c283a187d01bf75b3b21fab21b22d66076e97f9f 100644 (file)
@@ -1,6 +1,6 @@
 // Test that auto works with VLAs.
 // { dg-do compile { target c++11 } }
-// { dg-options "" { target { ! c++1y } } }
+// { dg-options "" { target { ! c++14 } } }
 
 void bar(int n)
 {
index fbf8bb2c96d037fe898ce7c377dc74fff9d47ede..614f9265d41223658a579c0e10ab3fb0a3815be4 100644 (file)
@@ -14,5 +14,5 @@ foo (void)
                                            warning.  */
   return 23;
 #endif
-  return 0b1101; /* { dg-warning "binary constants are a C..1y feature or GCC extension" } */
+  return 0b1101; /* { dg-warning "binary constants are a C..14 feature or GCC extension" } */
 }
index 7023c70cea0dfa51c484b3260fbef5dc3569ee47..c44ad787c96f60cfa62542e275dcaf2958c410f9 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "-fsanitize=vla-bound -Wall -Wno-unused-variable -std=c++1y" } */
+/* { dg-options "-fsanitize=vla-bound -Wall -Wno-unused-variable -std=c++14" } */
 /* { dg-shouldfail "ubsan" } */
 
 int
index df479d0b0bc758400aefd5ed09775f4b43c32553..eacd21237540a583323ed1a4e09a29b939b1ec76 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { ! c++1y } } } */
+/* { dg-do compile { target { ! c++14 } } } */
 /* { dg-options "-pedantic-errors -Wvla" } */
 
 void func (int i)
index 1c28c262d202b3a5eb609f154a1efe38f532ccdb..f96d78281b4565fba5d775f320a4aaeb907c85f4 100644 (file)
@@ -5683,7 +5683,7 @@ proc check_effective_target_c++ { } {
 }
 
 # Check whether the current active language standard supports the features
-# of C++11/C++1y by checking for the presence of one of the -std
+# of C++11/C++14 by checking for the presence of one of the -std
 # flags.  This assumes that the default for the compiler is C++98, and that
 # there will never be multiple -std= arguments on the command line.
 proc check_effective_target_c++11_only { } {
@@ -5696,28 +5696,29 @@ proc check_effective_target_c++11 { } {
     if [check_effective_target_c++11_only] {
        return 1
     }
-    return [check_effective_target_c++1y]
+    return [check_effective_target_c++14]
 }
 proc check_effective_target_c++11_down { } {
     if ![check_effective_target_c++] {
        return 0
     }
-    return ![check_effective_target_c++1y]
+    return ![check_effective_target_c++14]
 }
 
-proc check_effective_target_c++1y_only { } {
+proc check_effective_target_c++14_only { } {
     if ![check_effective_target_c++] {
        return 0
     }
     return [check-flags { { } { } { -std=c++1y -std=gnu++1y -std=c++14 -std=gnu++14 } }]
 }
-proc check_effective_target_c++1y { } {
-    if [check_effective_target_c++1y_only] {
+
+proc check_effective_target_c++14 { } {
+    if [check_effective_target_c++14_only] {
        return 1
     }
     return [check_effective_target_c++1z]
 }
-proc check_effective_target_c++1y_down { } {
+proc check_effective_target_c++14_down { } {
     if ![check_effective_target_c++] {
        return 0
     }
index 89c840658f0a0102eb7559882ee8996b83e9dfa4..1b4e31d6be20918761bed284d4d2dd023ada340c 100644 (file)
@@ -1,3 +1,14 @@
+2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
+
+       * include/cpplib.h (enum c_lang): Add CLK_GNUCXX1Z, CLK_CXX1Z;
+       Rename CLK_GNUCXX1Y, CLK_CXX1Y to CLK_GNUCXX14, CLK_CXX14;
+       * init.c (struct lang_flags lang_defaults): Add column for trigraphs;
+       Add rows for CLK_GNUCXX1Z, CLK_CXX1Z; (cpp_set_lang): Set trigraphs;
+       (cpp_init_builtins): Set __cplusplus to 201402L for C++14;
+       Set __cplusplus to 201500L for C++17.
+       * expr.c (cpp_classify_number): Change C++1y to C++14 in binary
+       constants error message.
+
 2014-08-20  Marek Polacek  <polacek@redhat.com>
 
        * include/cpplib.h (cpp_options): Use signed char.
index 147bd97c5ece83cd0f1ce6b6afbed89007fd112b..07f1b2fb419aec7b44825f6ba4c0626856bf97cc 100644 (file)
@@ -687,7 +687,7 @@ cpp_classify_number (cpp_reader *pfile, const cpp_token *token,
       && CPP_PEDANTIC (pfile))
     cpp_error_with_line (pfile, CPP_DL_PEDWARN, virtual_location, 0,
                         CPP_OPTION (pfile, cplusplus)
-                        ? "binary constants are a C++1y feature "
+                        ? "binary constants are a C++14 feature "
                           "or GCC extension"
                         : "binary constants are a GCC extension");
 
index 9f87ff8b514f67025bc13cc6488b48aa65446ef1..28fc0f8965f13dc08428bfc2920682e28a55ce27 100644 (file)
@@ -166,7 +166,7 @@ enum cpp_ttype
 enum c_lang {CLK_GNUC89 = 0, CLK_GNUC99, CLK_GNUC11,
             CLK_STDC89, CLK_STDC94, CLK_STDC99, CLK_STDC11,
             CLK_GNUCXX, CLK_CXX98, CLK_GNUCXX11, CLK_CXX11,
-            CLK_GNUCXX1Y, CLK_CXX1Y, CLK_ASM};
+            CLK_GNUCXX14, CLK_CXX14, CLK_GNUCXX1Z, CLK_CXX1Z, CLK_ASM};
 
 /* Payload of a NUMBER, STRING, CHAR or COMMENT token.  */
 struct GTY(()) cpp_string {
index b80951544d4ac387b6d8203f86bce47c8b537ddb..0d2f73718bec0ed0d36cfc786567a8557893abe4 100644 (file)
@@ -90,26 +90,29 @@ struct lang_flags
   char user_literals;
   char binary_constants;
   char digit_separators;
+  char trigraphs;
 };
 
 static const struct lang_flags lang_defaults[] =
-{ /*              c99 c++ xnum xid c11 std  //   digr ulit rlit udlit bin_cst dig_sep */
-  /* GNUC89   */  { 0,  0,  1,   0,  0,  0,   1,   1,   0,   0,   0,    0,      0 },
-  /* GNUC99   */  { 1,  0,  1,   0,  0,  0,   1,   1,   1,   1,   0,    0,      0 },
-  /* GNUC11   */  { 1,  0,  1,   0,  1,  0,   1,   1,   1,   1,   0,    0,      0 },
-  /* STDC89   */  { 0,  0,  0,   0,  0,  1,   0,   0,   0,   0,   0,    0,      0 },
-  /* STDC94   */  { 0,  0,  0,   0,  0,  1,   0,   1,   0,   0,   0,    0,      0 },
-  /* STDC99   */  { 1,  0,  1,   0,  0,  1,   1,   1,   0,   0,   0,    0,      0 },
-  /* STDC11   */  { 1,  0,  1,   0,  1,  1,   1,   1,   1,   0,   0,    0,      0 },
-  /* GNUCXX   */  { 0,  1,  1,   0,  0,  0,   1,   1,   0,   0,   0,    0,      0 },
-  /* CXX98    */  { 0,  1,  1,   0,  0,  1,   1,   1,   0,   0,   0,    0,      0 },
-  /* GNUCXX11 */  { 1,  1,  1,   0,  1,  0,   1,   1,   1,   1,   1,    0,      0 },
-  /* CXX11    */  { 1,  1,  1,   0,  1,  1,   1,   1,   1,   1,   1,    0,      0 },
-  /* GNUCXX1Y */  { 1,  1,  1,   0,  1,  0,   1,   1,   1,   1,   1,    1,      1 },
-  /* CXX1Y    */  { 1,  1,  1,   0,  1,  1,   1,   1,   1,   1,   1,    1,      1 },
-  /* ASM      */  { 0,  0,  1,   0,  0,  0,   1,   0,   0,   0,   0,    0,      0 }
+{ /*              c99 c++ xnum xid c11 std // digr ulit rlit udlit bincst digsep trig */
+  /* GNUC89   */  { 0,  0,  1,  0,  0,  0,  1,  1,  0,   0,   0,    0,     0,     0 },
+  /* GNUC99   */  { 1,  0,  1,  0,  0,  0,  1,  1,  1,   1,   0,    0,     0,     0 },
+  /* GNUC11   */  { 1,  0,  1,  0,  1,  0,  1,  1,  1,   1,   0,    0,     0,     0 },
+  /* STDC89   */  { 0,  0,  0,  0,  0,  1,  0,  0,  0,   0,   0,    0,     0,     1 },
+  /* STDC94   */  { 0,  0,  0,  0,  0,  1,  0,  1,  0,   0,   0,    0,     0,     1 },
+  /* STDC99   */  { 1,  0,  1,  0,  0,  1,  1,  1,  0,   0,   0,    0,     0,     1 },
+  /* STDC11   */  { 1,  0,  1,  0,  1,  1,  1,  1,  1,   0,   0,    0,     0,     1 },
+  /* GNUCXX   */  { 0,  1,  1,  0,  0,  0,  1,  1,  0,   0,   0,    0,     0,     0 },
+  /* CXX98    */  { 0,  1,  1,  0,  0,  1,  1,  1,  0,   0,   0,    0,     0,     1 },
+  /* GNUCXX11 */  { 1,  1,  1,  0,  1,  0,  1,  1,  1,   1,   1,    0,     0,     0 },
+  /* CXX11    */  { 1,  1,  1,  0,  1,  1,  1,  1,  1,   1,   1,    0,     0,     1 },
+  /* GNUCXX14 */  { 1,  1,  1,  0,  1,  0,  1,  1,  1,   1,   1,    1,     1,     0 },
+  /* CXX14    */  { 1,  1,  1,  0,  1,  1,  1,  1,  1,   1,   1,    1,     1,     1 },
+  /* GNUCXX1Z */  { 1,  1,  1,  0,  1,  0,  1,  1,  1,   1,   1,    1,     1,     0 },
+  /* CXX1Z    */  { 1,  1,  1,  0,  1,  1,  1,  1,  1,   1,   1,    1,     1,     0 },
+  /* ASM      */  { 0,  0,  1,  0,  0,  0,  1,  0,  0,   0,   0,    0,     0,     0 }
   /* xid should be 1 for GNUC99, STDC99, GNUCXX, CXX98, GNUCXX11, CXX11,
-     GNUCXX1Y, and CXX1Y when no longer experimental (when all uses of
+     GNUCXX14, and CXX14 when no longer experimental (when all uses of
      identifiers in the compiler have been audited for correct handling
      of extended identifiers).  */
 };
@@ -128,7 +131,6 @@ cpp_set_lang (cpp_reader *pfile, enum c_lang lang)
   CPP_OPTION (pfile, extended_identifiers)      = l->extended_identifiers;
   CPP_OPTION (pfile, c11_identifiers)           = l->c11_identifiers;
   CPP_OPTION (pfile, std)                       = l->std;
-  CPP_OPTION (pfile, trigraphs)                         = l->std;
   CPP_OPTION (pfile, cplusplus_comments)        = l->cplusplus_comments;
   CPP_OPTION (pfile, digraphs)                  = l->digraphs;
   CPP_OPTION (pfile, uliterals)                         = l->uliterals;
@@ -136,6 +138,7 @@ cpp_set_lang (cpp_reader *pfile, enum c_lang lang)
   CPP_OPTION (pfile, user_literals)             = l->user_literals;
   CPP_OPTION (pfile, binary_constants)          = l->binary_constants;
   CPP_OPTION (pfile, digit_separators)          = l->digit_separators;
+  CPP_OPTION (pfile, trigraphs)                         = l->trigraphs;
 }
 
 /* Initialize library global state.  */
@@ -489,9 +492,12 @@ cpp_init_builtins (cpp_reader *pfile, int hosted)
 
   if (CPP_OPTION (pfile, cplusplus))
     {
-      if (CPP_OPTION (pfile, lang) == CLK_CXX1Y
-         || CPP_OPTION (pfile, lang) == CLK_GNUCXX1Y)
-       _cpp_define_builtin (pfile, "__cplusplus 201300L");
+      if (CPP_OPTION (pfile, lang) == CLK_CXX1Z
+         || CPP_OPTION (pfile, lang) == CLK_GNUCXX1Z)
+       _cpp_define_builtin (pfile, "__cplusplus 201500L");
+      else if (CPP_OPTION (pfile, lang) == CLK_CXX14
+         || CPP_OPTION (pfile, lang) == CLK_GNUCXX14)
+       _cpp_define_builtin (pfile, "__cplusplus 201402L");
       else if (CPP_OPTION (pfile, lang) == CLK_CXX11
               || CPP_OPTION (pfile, lang) == CLK_GNUCXX11)
        _cpp_define_builtin (pfile, "__cplusplus 201103L");
@@ -509,7 +515,9 @@ cpp_init_builtins (cpp_reader *pfile, int hosted)
     _cpp_define_builtin (pfile, "__STDC_VERSION__ 199901L");
 
   if (CPP_OPTION (pfile, uliterals)
-      && !CPP_OPTION (pfile, cplusplus))
+      && !(CPP_OPTION (pfile, cplusplus)
+          && (CPP_OPTION (pfile, lang) == CLK_GNUCXX
+           || CPP_OPTION (pfile, lang) == CLK_CXX98)))
     {
       _cpp_define_builtin (pfile, "__STDC_UTF_16__ 1");
       _cpp_define_builtin (pfile, "__STDC_UTF_32__ 1");