cpplib.h (enum c_lang): Add CLK_GNUCXX1Z, CLK_CXX1Z...

libcpp/

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.

From-SVN: r214400
This commit is contained in:
Edward Smith-Rowland 2014-08-23 16:50:22 +00:00 committed by Edward Smith-Rowland
parent 5dba876931
commit e4276ba523
156 changed files with 458 additions and 234 deletions

View 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> 2014-08-23 John David Anglin <danglin@gcc.gnu.org>
PR target/62038 PR target/62038

View 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> 2014-08-22 Jason Merrill <jason@redhat.com>
* c.opt (std=gnu++17): Fix alias. * c.opt (std=gnu++17): Fix alias.

View file

@ -640,8 +640,9 @@ enum cxx_dialect {
/* C++11 */ /* C++11 */
cxx0x, cxx0x,
cxx11 = cxx0x, cxx11 = cxx0x,
/* C++1y (C++14?) */ /* C++14 */
cxx1y, cxx1y,
cxx14 = cxx1y,
/* C++1z (C++17?) */ /* C++1z (C++17?) */
cxx1z cxx1z
}; };

View file

@ -116,7 +116,7 @@ static bool done_preinclude;
static void handle_OPT_d (const char *); static void handle_OPT_d (const char *);
static void set_std_cxx98 (int); static void set_std_cxx98 (int);
static void set_std_cxx11 (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_cxx1z (int);
static void set_std_c89 (int, int); static void set_std_c89 (int, int);
static void set_std_c99 (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: case OPT_std_gnu__1y:
if (!preprocessing_asm_p) 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) if (code == OPT_std_c__1y)
cpp_opts->ext_numeric_literals = 0; 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). */ /* Set the C++ 201y draft standard (without GNU extensions if ISO). */
static void 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_gnu_keywords = iso;
flag_no_nonansi_builtin = iso; flag_no_nonansi_builtin = iso;
flag_iso = iso; flag_iso = iso;
/* C++11 includes the C99 standard library. */ /* C++11 includes the C99 standard library. */
flag_isoc94 = 1; flag_isoc94 = 1;
flag_isoc99 = 1; flag_isoc99 = 1;
cxx_dialect = cxx1y; cxx_dialect = cxx14;
} }
/* Set the C++ 201z draft standard (without GNU extensions if ISO). */ /* Set the C++ 201z draft standard (without GNU extensions if ISO). */
static void static void
set_std_cxx1z (int iso) 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_gnu_keywords = iso;
flag_no_nonansi_builtin = iso; flag_no_nonansi_builtin = iso;
flag_iso = iso; flag_iso = iso;
/* C++11 includes the C99 standard library. */ /* C++11 includes the C99 standard library. */
flag_isoc94 = 1; flag_isoc94 = 1;
flag_isoc99 = 1; flag_isoc99 = 1;
flag_isoc11 = 1;
cxx_dialect = cxx1z; cxx_dialect = cxx1z;
} }

View file

@ -146,12 +146,12 @@ ubsan_instrument_shift (location_t loc, enum tree_code code,
build_int_cst (TREE_TYPE (tt), 0)); 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)) x < 0 || ((unsigned) x >> (precm1 - y))
if > 1, is undefined. */ if > 1, is undefined. */
if (code == LSHIFT_EXPR if (code == LSHIFT_EXPR
&& !TYPE_UNSIGNED (TREE_TYPE (op0)) && !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); tree x = fold_build2 (MINUS_EXPR, integer_type_node, precm1, op1);
tt = fold_convert_loc (loc, unsigned_type_for (type0), op0); tt = fold_convert_loc (loc, unsigned_type_for (type0), op0);

View 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> 2014-08-23 Jason Merrill <jason@redhat.com>
Allow non-constexpr variable templates. Allow non-constexpr variable templates.

View 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 /* We don't allow VLAs at non-function scopes, or during
tentative template substitution. */ tentative template substitution. */
|| !at_function_scope_p () || !at_function_scope_p ()
|| (cxx_dialect < cxx1y && !(complain & tf_error))) || (cxx_dialect < cxx14 && !(complain & tf_error)))
{ {
if (!(complain & tf_error)) if (!(complain & tf_error))
return error_mark_node; 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"); error ("size of array is not an integral constant-expression");
size = integer_one_node; size = integer_one_node;
} }
else if (cxx_dialect < cxx1y && pedantic && warn_vla != 0) else if (cxx_dialect < cxx14 && pedantic && warn_vla != 0)
{ {
if (name) if (name)
pedwarn (input_location, OPT_Wvla, "ISO C++ forbids variable length array %qD", 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); 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, /* If the VLA bound is larger than half the address space,
or less than zero, throw std::bad_array_length. */ 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 DECL_ATTRIBUTES
(current_function_decl))) (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. */ length size of an array; see above. */
/* We have to add 1 -- in the ubsan routine we generate /* 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; 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)) && (flag_iso || warn_vla > 0))
pedwarn (input_location, OPT_Wvla, "array of array of runtime bound"); pedwarn (input_location, OPT_Wvla, "array of array of runtime bound");
@ -9648,14 +9648,14 @@ grokdeclarator (const cp_declarator *declarator,
if (current_class_type if (current_class_type
&& LAMBDA_TYPE_P (current_class_type)) && LAMBDA_TYPE_P (current_class_type))
/* OK for C++11 lambdas. */; /* OK for C++11 lambdas. */;
else if (cxx_dialect < cxx1y) else if (cxx_dialect < cxx14)
{ {
error ("%qs function uses " error ("%qs function uses "
"%<auto%> type specifier without trailing " "%<auto%> type specifier without trailing "
"return type", name); "return type", name);
inform (input_location, "deduced return type " inform (input_location, "deduced return type "
"only available with -std=c++1y or " "only available with -std=c++14 or "
"-std=gnu++1y"); "-std=gnu++14");
} }
else if (virtualp) else if (virtualp)
{ {
@ -9872,7 +9872,7 @@ grokdeclarator (const cp_declarator *declarator,
: G_("cannot declare pointer to qualified function type %qT"), : G_("cannot declare pointer to qualified function type %qT"),
type); 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)) && (flag_iso || warn_vla > 0))
pedwarn (input_location, OPT_Wvla, pedwarn (input_location, OPT_Wvla,
declarator->kind == cdk_reference declarator->kind == cdk_reference
@ -10229,7 +10229,7 @@ grokdeclarator (const cp_declarator *declarator,
type = error_mark_node; 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)) && (flag_iso || warn_vla > 0))
pedwarn (input_location, OPT_Wvla, pedwarn (input_location, OPT_Wvla,
"typedef naming array of runtime bound"); "typedef naming array of runtime bound");
@ -10475,7 +10475,7 @@ grokdeclarator (const cp_declarator *declarator,
if (type_uses_auto (type)) if (type_uses_auto (type))
{ {
if (cxx_dialect >= cxx1y) if (cxx_dialect >= cxx14)
error ("%<auto%> parameter not permitted in this context"); error ("%<auto%> parameter not permitted in this context");
else else
error ("parameter declared %<auto%>"); error ("parameter declared %<auto%>");
@ -14629,7 +14629,7 @@ fndecl_declared_return_type (tree fn)
bool bool
undeduced_auto_decl (tree decl) undeduced_auto_decl (tree decl)
{ {
if (cxx_dialect < cxx1y) if (cxx_dialect < cxx14)
return false; return false;
return type_uses_auto (TREE_TYPE (decl)); return type_uses_auto (TREE_TYPE (decl));
} }

View 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)) 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); "of runtime bound", type);
if (TREE_CODE (type) == ARRAY_TYPE if (TREE_CODE (type) == ARRAY_TYPE
&& variably_modified_type_p (TREE_TYPE (type), NULL_TREE)) && variably_modified_type_p (TREE_TYPE (type), NULL_TREE))

View file

@ -4970,10 +4970,10 @@ cp_parser_unqualified_id (cp_parser* parser,
/* ~auto means the destructor of whatever the object is. */ /* ~auto means the destructor of whatever the object is. */
if (cp_parser_is_keyword (token, RID_AUTO)) if (cp_parser_is_keyword (token, RID_AUTO))
{ {
if (cxx_dialect < cxx1y) if (cxx_dialect < cxx14)
pedwarn (input_location, 0, pedwarn (input_location, 0,
"%<~auto%> only available with " "%<~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);
return build_nt (BIT_NOT_EXPR, make_auto ()); 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) && cp_lexer_nth_token_is_keyword (parser->lexer, 2, RID_AUTO)
&& !type_dependent_expression_p (object)) && !type_dependent_expression_p (object))
{ {
if (cxx_dialect < cxx1y) if (cxx_dialect < cxx14)
pedwarn (input_location, 0, pedwarn (input_location, 0,
"%<~auto%> only available with " "%<~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);
cp_lexer_consume_token (parser->lexer); cp_lexer_consume_token (parser->lexer);
*scope = NULL_TREE; *scope = NULL_TREE;
@ -9058,10 +9058,10 @@ cp_parser_lambda_introducer (cp_parser* parser, tree lambda_expr)
{ {
bool direct, non_constant; bool direct, non_constant;
/* An explicit initializer exists. */ /* An explicit initializer exists. */
if (cxx_dialect < cxx1y) if (cxx_dialect < cxx14)
pedwarn (input_location, 0, pedwarn (input_location, 0,
"lambda capture initializers " "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, capture_init_expr = cp_parser_initializer (parser, &direct,
&non_constant); &non_constant);
explicit_init_p = true; explicit_init_p = true;
@ -9184,10 +9184,10 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr)
an opening angle if present. */ an opening angle if present. */
if (cp_lexer_next_token_is (parser->lexer, CPP_LESS)) 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, pedwarn (parser->lexer->next_token->location, 0,
"lambda templates are only available with " "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); cp_lexer_consume_token (parser->lexer);
@ -12162,7 +12162,7 @@ cp_parser_decltype (cp_parser *parser)
return error_mark_node; return error_mark_node;
/* decltype (auto) */ /* decltype (auto) */
if (cxx_dialect >= cxx1y if (cxx_dialect >= cxx14
&& cp_lexer_next_token_is_keyword (parser->lexer, RID_AUTO)) && cp_lexer_next_token_is_keyword (parser->lexer, RID_AUTO))
{ {
cp_lexer_consume_token (parser->lexer); 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) if (! cp_parser_uncommitted_to_tentative_parse_p (parser)
&& type_uses_auto (type_specified)) && type_uses_auto (type_specified))
{ {
if (cxx_dialect < cxx1y) if (cxx_dialect < cxx14)
{ {
error ("invalid use of %<auto%> in conversion operator"); error ("invalid use of %<auto%> in conversion operator");
return error_mark_node; 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 (current_class_type && LAMBDA_TYPE_P (current_class_type))
{ {
if (cxx_dialect < cxx1y) if (cxx_dialect < cxx14)
pedwarn (location_of (type), 0, pedwarn (location_of (type), 0,
"use of %<auto%> in lambda parameter declaration " "use of %<auto%> in lambda parameter declaration "
"only available with " "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, pedwarn (location_of (type), 0,
"use of %<auto%> in parameter declaration " "use of %<auto%> in parameter declaration "
"only available with " "only available with "
"-std=c++1y or -std=gnu++1y"); "-std=c++14 or -std=gnu++14");
else else
pedwarn (location_of (type), OPT_Wpedantic, pedwarn (location_of (type), OPT_Wpedantic,
"ISO C++ forbids use of %<auto%> in parameter " "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 if (type_specifier_seq.type
/* None of the valid uses of 'auto' in C++14 involve the type-id /* None of the valid uses of 'auto' in C++14 involve the type-id
nonterminal, but it is valid in a trailing-return-type. */ 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)) && type_uses_auto (type_specifier_seq.type))
{ {
/* A type-id with type 'auto' is only ok if the abstract declarator /* 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"); = G_("types may not be defined in template arguments");
r = cp_parser_type_id_1 (parser, true, false); r = cp_parser_type_id_1 (parser, true, false);
parser->type_definition_forbidden_message = saved_message; 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"); error ("invalid use of %<auto%> in template argument");
r = error_mark_node; r = error_mark_node;
@ -22104,7 +22104,7 @@ cp_parser_std_attribute (cp_parser *parser)
if (is_attribute_p ("noreturn", attr_id)) if (is_attribute_p ("noreturn", attr_id))
TREE_PURPOSE (TREE_PURPOSE (attribute)) = get_identifier ("gnu"); TREE_PURPOSE (TREE_PURPOSE (attribute)) = get_identifier ("gnu");
/* C++14 deprecated attribute is equivalent to GNU's. */ /* 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"); 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))) || !TEMPLATE_PARM_PARAMETER_PACK (DECL_INITIAL (parm)))
ok = false; 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 parm_type = TREE_VEC_ELT (parameter_list, 0);
tree type = INNERMOST_TEMPLATE_PARMS (parm_type); 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 (!ok)
{ {
if (cxx_dialect >= cxx1y) if (cxx_dialect >= cxx14)
error ("literal operator template %qD has invalid parameter list." error ("literal operator template %qD has invalid parameter list."
" Expected non-type template argument pack <char...>" " Expected non-type template argument pack <char...>"
" or <typename CharT, CharT...>", " or <typename CharT, CharT...>",

View file

@ -2310,10 +2310,10 @@ check_template_variable (tree decl)
int wanted = num_template_headers_for_class (ctx); int wanted = num_template_headers_for_class (ctx);
if (!TYPE_P (ctx) || !CLASSTYPE_TEMPLATE_INFO (ctx)) if (!TYPE_P (ctx) || !CLASSTYPE_TEMPLATE_INFO (ctx))
{ {
if (cxx_dialect < cxx1y) if (cxx_dialect < cxx14)
pedwarn (DECL_SOURCE_LOCATION (decl), 0, pedwarn (DECL_SOURCE_LOCATION (decl), 0,
"variable templates only available with " "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. // Namespace-scope variable templates should have a template header.
++wanted; ++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_reference_type (type, TYPE_REF_IS_RVALUE (t));
r = cp_build_qualified_type_real (r, cp_type_quals (t), complain); 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)) && !(TREE_CODE (t) == REFERENCE_TYPE && REFERENCE_VLA_OK (t))
&& array_of_runtime_bound_p (type) && array_of_runtime_bound_p (type)
&& (flag_iso || warn_vla > 0)) && (flag_iso || warn_vla > 0))

View file

@ -1610,7 +1610,7 @@ tree
force_paren_expr (tree expr) force_paren_expr (tree expr)
{ {
/* This is only needed for decltype(auto) in C++14. */ /* This is only needed for decltype(auto) in C++14. */
if (cxx_dialect < cxx1y) if (cxx_dialect < cxx14)
return expr; return expr;
/* If we're in unevaluated context, we can't be deducing a /* 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)) && (flag_iso || warn_vla > 0))
{ {
if (complain & tf_warning_or_error) if (complain & tf_warning_or_error)

View 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))); 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 bool
array_of_runtime_bound_p (tree t) array_of_runtime_bound_p (tree t)

View 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 /* In C++14 we can end up comparing 'auto' to a normal template
parameter. Don't confuse them. */ 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 TYPE_IDENTIFIER (t1) == TYPE_IDENTIFIER (t2);
return true; return true;
@ -1566,7 +1566,7 @@ cxx_sizeof_or_alignof_type (tree type, enum tree_code op, bool complain)
return value; 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)) && (flag_iso || warn_vla > 0))
{ {
if (complain) 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 (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)) && (flag_iso || warn_vla > 0))
{ {
if (complain & tf_warning_or_error) 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 /* In C++14 mode, this interacts badly with force_paren_expr. And it
isn't necessary in any mode, because the code below handles isn't necessary in any mode, because the code below handles
glvalues properly. For 4.9, just skip it in C++14 mode. */ 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); expr = TREE_OPERAND (expr, 0);
if ((TREE_CODE (type) == REFERENCE_TYPE if ((TREE_CODE (type) == REFERENCE_TYPE

View file

@ -1722,13 +1722,23 @@ The name @samp{c++0x} is deprecated.
GNU dialect of @option{-std=c++11}. GNU dialect of @option{-std=c++11}.
The name @samp{gnu++0x} is deprecated. 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 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. change in incompatible ways in future releases.
@item gnu++1y @item gnu++1z
GNU dialect of @option{-std=c++1y}. Support is highly experimental, GNU dialect of @option{-std=c++1z}. Support is highly experimental,
and will almost certainly change in incompatible ways in future and will almost certainly change in incompatible ways in future
releases. releases.
@end table @end table
@ -2676,7 +2686,7 @@ When this option is turned off these suffixes are treated
as C++11 user-defined literal numeric suffixes. as C++11 user-defined literal numeric suffixes.
This is on by default for all pre-C++11 dialects and all GNU dialects: 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=c++98}, @option{-std=gnu++98}, @option{-std=gnu++11},
@option{-std=gnu++1y}. @option{-std=gnu++14}.
This option is off by default This option is off by default
for ISO C++11 onwards (@option{-std=c++11}, ...). for ISO C++11 onwards (@option{-std=c++11}, ...).
@end table @end table
@ -5510,7 +5520,7 @@ call into a diagnostics message call instead. When reaching the
@opindex fsanitize=vla-bound @opindex fsanitize=vla-bound
This option instructs the compiler to check that the size of a variable 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 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. instead.
@item -fsanitize=null @item -fsanitize=null

View 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> 2014-08-22 Marek Polacek <polacek@redhat.com>
PR c++/62199 PR c++/62199

View file

@ -19,7 +19,7 @@ A<int> A1;
// CWG issue 625 // CWG issue 625
A<auto> A2 = A1; // { dg-error "" } 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" } void bar(auto i) // { dg-error "incomplete|auto" }
{ {

View file

@ -1,5 +1,5 @@
// PR c++/58550 // PR c++/58550
// { dg-do compile { target c++11 } } // { dg-do compile { target c++11 } }
auto foo(); // { dg-error "auto" "" { target { ! c++1y } } } auto foo(); // { dg-error "auto" "" { target { ! c++14 } } }
auto fp = foo; // { dg-error "auto" "" { target c++1y } } auto fp = foo; // { dg-error "auto" "" { target c++14 } }

View file

@ -15,13 +15,13 @@ const std::type_info &t2 = typeid (auto *); // { dg-error "auto" }
struct A struct A
{ {
operator auto (); // { dg-error "auto" "" { target { ! c++1y } } } operator auto (); // { dg-error "auto" "" { target { ! c++14 } } }
operator auto *(); // { dg-error "auto" "" { target { ! c++1y } } } operator auto *(); // { dg-error "auto" "" { target { ! c++14 } } }
}; };
struct A2 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" } 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 <typename T = auto> struct E {}; // { dg-error "invalid use of" }
template <class T = auto *> struct F {}; // { dg-error "invalid use of|expected" } template <class T = auto *> struct F {}; // { dg-error "invalid use of|expected" }
auto fnlate () -> auto; // { dg-error "invalid use of" "" { 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++1y } } } auto fnlate2 () -> auto *; // { dg-error "invalid use of|expected" "" { target { ! c++14 } } }
void void
badthrow () throw (auto) // { dg-error "invalid use of" } badthrow () throw (auto) // { dg-error "invalid use of" }

View file

@ -0,0 +1,5 @@
// { dg-do compile { target c++11_only } }
#if __cplusplus != 201103L
#error "__cplusplus != 201103L"
#endif

View file

@ -0,0 +1,6 @@
// { dg-do compile }
// { dg-options "-std=c++0x" }
#if __cplusplus != 201103L
#error "__cplusplus != 201103L"
#endif

View file

@ -1,6 +1,6 @@
// PR c++/42059 // PR c++/42059
// { dg-do compile { target c++11 } } // { dg-do compile { target c++11 } }
// { dg-options "" { target { ! c++1y } } } // { dg-options "" { target { ! c++14 } } }
void void
foo (int i) foo (int i)

View file

@ -1,5 +1,5 @@
// PR c++/59111 // PR c++/59111
// { dg-do compile { target c++11 } } // { 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 "" } int i = foo(); // { dg-error "" }

View file

@ -3,14 +3,14 @@
// { dg-do compile { target c++11 } } // { dg-do compile { target c++11 } }
auto f1 () -> int; 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" } int f3 () -> int; // { dg-error "trailing return type" }
auto *f4 () -> int; // { dg-error "trailing return type" } auto *f4 () -> int; // { dg-error "trailing return type" }
struct A struct A
{ {
auto f5 () const -> int; 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" } int f7 () -> int; // { dg-error "trailing return type" }
auto *f8 () -> int; // { dg-error "trailing return type" } auto *f8 () -> int; // { dg-error "trailing return type" }
}; };

View file

@ -1,4 +1,4 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
class [[deprecated]] A class [[deprecated]] A
{ {

View file

@ -1,5 +1,5 @@
// DR 1586 // DR 1586
// { dg-do run { target c++1y } } // { dg-do run { target c++14 } }
template <class T> template <class T>
void f (T* p) void f (T* p)

View file

@ -1,4 +1,4 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
constexpr auto f() { return (char)42; } constexpr auto f() { return (char)42; }
#define SA(X) static_assert ((X),#X) #define SA(X) static_assert ((X),#X)

View file

@ -1,6 +1,6 @@
// A template declared with auto should be declared with auto in an // A template declared with auto should be declared with auto in an
// explicit instantiation or explicit specialization, too. // explicit instantiation or explicit specialization, too.
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
template <class T> template <class T>
auto f(T t) { return t; } auto f(T t) { return t; }

View 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 f() { return; } // OK, return type is void
auto* g() { return; } // { dg-error "no value" } auto* g() { return; } // { dg-error "no value" }

View file

@ -1,4 +1,4 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
// { dg-final { scan-assembler "_ZN1AIiEcvDaEv" } } // { dg-final { scan-assembler "_ZN1AIiEcvDaEv" } }
template <class T> template <class T>

View file

@ -1,4 +1,4 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
struct A { struct A {
template <class T> template <class T>

View file

@ -1,5 +1,5 @@
// PR c++/56177 // PR c++/56177
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
auto f (); auto f ();
auto f () { return 33; } auto f () { return 33; }

View file

@ -1,4 +1,4 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
// { dg-options "-Wno-return-local-addr" } // { dg-options "-Wno-return-local-addr" }
template<class,class> struct same_type; template<class,class> struct same_type;

View file

@ -1,4 +1,4 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
template<class,class> struct ST; template<class,class> struct ST;
template<class T> struct ST<T,T> {}; template<class T> struct ST<T,T> {};

View file

@ -1,4 +1,4 @@
// { dg-do run { target c++1y } } // { dg-do run { target c++14 } }
int c; int c;
int d; int d;

View file

@ -1,4 +1,4 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
struct A struct A
{ {

View file

@ -1,4 +1,4 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
template <class T> template <class T>
auto f() { return T::i; } auto f() { return T::i; }

View file

@ -1,3 +1,3 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
auto f() { return f(); } // { dg-error "auto" } auto f() { return f(); } // { dg-error "auto" }

View file

@ -1,4 +1,4 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
template <class T> template <class T>
auto f(T) { return 42; } auto f(T) { return 42; }

View file

@ -1,5 +1,5 @@
// N3638: decltype(auto) must stand alone // N3638: decltype(auto) must stand alone
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
void f(); void f();
decltype(auto) g1() { return &f; } decltype(auto) g1() { return &f; }

View file

@ -1,4 +1,4 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
struct A struct A
{ {

View file

@ -1,5 +1,5 @@
// PR c++/58561 // PR c++/58561
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
// { dg-options "-g" } // { dg-options "-g" }
auto foo(); auto foo();

View file

@ -1,5 +1,5 @@
// PR c++/60314 // PR c++/60314
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
// { dg-options "-g" } // { dg-options "-g" }
// fine // fine

View file

@ -1,5 +1,5 @@
// PR c++/60574 // PR c++/60574
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
// { dg-require-effective-target lto } // { dg-require-effective-target lto }
// { dg-options "-flto" } // { dg-options "-flto" }

View file

@ -1,4 +1,4 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
bool b; bool b;
auto f() auto f()

View file

@ -1,4 +1,4 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
template <class T> template <class T>
constexpr auto f(T t) { return t+1; } constexpr auto f(T t) { return t+1; }

View file

@ -1,4 +1,4 @@
// { dg-do run { target c++1y } } // { dg-do run { target c++14 } }
int i; int i;
auto& f() { return i; } auto& f() { return i; }

View 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, class U> struct ST;
template <class T> struct ST<T,T> {}; template <class T> struct ST<T,T> {};

View file

@ -1,4 +1,4 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
auto f(); auto f();

View 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() { return 42; } // { dg-message "old declaration .auto" }
auto f(); // OK auto f(); // OK

View file

@ -1,4 +1,4 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
// { dg-final { scan-assembler "_Z1fIiERDaRKT_S1_" } } // { dg-final { scan-assembler "_Z1fIiERDaRKT_S1_" } }
template <class T> template <class T>

View file

@ -1,5 +1,5 @@
// Mangling for decltype(auto) // Mangling for decltype(auto)
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
void f(); void f();

View file

@ -1,5 +1,5 @@
// PR c++/60312 // PR c++/60312
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
template<typename> struct A; template<typename> struct A;

View file

@ -1,5 +1,5 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14_only } }
#if __cplusplus <= 201103L #if __cplusplus != 201402L
#error #error "__cplusplus != 201402L"
#endif #endif

View file

@ -0,0 +1,6 @@
// { dg-do compile }
// { dg-options "-std=c++1y" }
#if __cplusplus != 201402L
#error "__cplusplus != 201402L"
#endif

View file

@ -1,4 +1,4 @@
// { dg-do compile { target { ! c++1y } } } // { dg-do compile { target { ! c++14 } } }
#define assert(E) if(!(E))__builtin_abort(); #define assert(E) if(!(E))__builtin_abort();

View file

@ -1,4 +1,4 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
int int
main() main()

View file

@ -1,4 +1,4 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
#define assert(E) if(!(E))__builtin_abort(); #define assert(E) if(!(E))__builtin_abort();

View file

@ -1,5 +1,5 @@
// Out-of-line generic member function definitions. // Out-of-line generic member function definitions.
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
// { dg-options "" } // { dg-options "" }
struct A { struct A {

View file

@ -1,7 +1,7 @@
// Testcase for an extension to allow return type deduction when the lambda // Testcase for an extension to allow return type deduction when the lambda
// contains more than just a single return-statement. // contains more than just a single return-statement.
// { dg-do run { target c++1y } } // { dg-do run { target c++14 } }
bool b; bool b;
template <class T> template <class T>

View file

@ -1,5 +1,5 @@
// Generic lambda conversion to function ptr test from N3690 5.1.2.6 // 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 "" } // { dg-options "" }
void f1(int (*)(int)) { } void f1(int (*)(int)) { }

View file

@ -1,5 +1,5 @@
// Generic lambda type dependence test part from N3690 5.1.2.12 // 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(int, const int (&)[2] = {}) { } // #1
void f(const int&, const int (&)[1]) { } // #2 void f(const int&, const int (&)[1]) { } // #2

View file

@ -1,5 +1,5 @@
// Mixed explicit and implicit generic lambda test. // Mixed explicit and implicit generic lambda test.
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
int main() int main()
{ {

View file

@ -1,6 +1,6 @@
// Ensure that generic lambdas properly construct and destroy user types. // Ensure that generic lambdas properly construct and destroy user types.
// { dg-options "-DUSE_AUTO_SYNTAX" } // { dg-options "-DUSE_AUTO_SYNTAX" }
// { dg-do run { target c++1y } } // { dg-do run { target c++14 } }
int i = 3; int i = 3;

View file

@ -1,5 +1,5 @@
// Basic generic lambda test // 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, typename U> struct pair {};
template <typename... T> struct tuple {}; template <typename... T> struct tuple {};

View file

@ -1,5 +1,5 @@
// PR c++/59271 // PR c++/59271
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
extern "C" int printf (const char *, ...); extern "C" int printf (const char *, ...);

View file

@ -1,5 +1,5 @@
// Explicit generic lambda test from N3690 5.1.2.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> #include <iostream>

View file

@ -1,5 +1,5 @@
// Explicit generic lambda conversion to function ptr test from N3690 5.1.2.6 // 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 "" } // { dg-options "" }
void f1(int (*)(int)) { } void f1(int (*)(int)) { }

View file

@ -1,5 +1,5 @@
// Ensure that generic lambdas properly construct and destroy user types. // 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" } // { dg-options "-DUSE_EXPLICIT_TEMPLATE_SYNTAX" }
#include "lambda-generic-udt.C" #include "lambda-generic-udt.C"

View file

@ -1,5 +1,5 @@
// Generic lambda test from N3690 5.1.2.5 // Generic lambda test from N3690 5.1.2.5
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
#include <iostream> #include <iostream>

View file

@ -1,5 +1,5 @@
// Test for the explicit initializer extension of C++1y // Test for the explicit initializer extension of C++14
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
int main() int main()
{ {

View file

@ -1,6 +1,6 @@
// N3648: capture init // N3648: capture init
// { dg-options "-w" } // { dg-options "-w" }
// { dg-do run { target c++1y } } // { dg-do run { target c++14 } }
int main() int main()
{ {

View file

@ -1,5 +1,5 @@
// N3648: redundancy and capture init // N3648: redundancy and capture init
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
int main() int main()
{ {

View file

@ -1,6 +1,6 @@
// N3648: capture init at non-block scope // N3648: capture init at non-block scope
// { dg-options "-w" } // { dg-options "-w" }
// { dg-do run { target c++1y } } // { dg-do run { target c++14 } }
int i = 42; int i = 42;
int j = [x=i]{ return x; }(); int j = [x=i]{ return x; }();

View file

@ -1,5 +1,5 @@
// N3648: capture init example from paper // N3648: capture init example from paper
// { dg-do run { target c++1y } } // { dg-do run { target c++14 } }
int x = 4; int x = 4;
auto y = [&r = x, x = x+1]()->int { auto y = [&r = x, x = x+1]()->int {

View file

@ -1,5 +1,5 @@
// Test for paren and brace initializers // Test for paren and brace initializers
// { dg-do run { target c++1y } } // { dg-do run { target c++14 } }
#include <initializer_list> #include <initializer_list>

View file

@ -1,5 +1,5 @@
// Test that captures are not named in the closure type. // Test that captures are not named in the closure type.
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
int main() int main()
{ {

View file

@ -1,5 +1,5 @@
// PR c++/59349 // PR c++/59349
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
int foo () { int foo () {
[bar()]{}; // { dg-error "empty initializer" } [bar()]{}; // { dg-error "empty initializer" }

View file

@ -1,5 +1,5 @@
// DR1760: "no additional copy and destruction is performed" // DR1760: "no additional copy and destruction is performed"
// { dg-do run { target c++1y } } // { dg-do run { target c++14 } }
#include <cassert> #include <cassert>

View file

@ -1,4 +1,4 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
void f() void f()
{ {

View file

@ -1,5 +1,5 @@
// Test that the parens don't show up in the mangling // 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-options "-Wno-return-local-addr" }
// { dg-final { scan-assembler "_Z1gI1AEDTdtfp_1iET_" } } // { dg-final { scan-assembler "_Z1gI1AEDTdtfp_1iET_" } }

View file

@ -1,4 +1,4 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
#include <chrono> #include <chrono>

View file

@ -1,4 +1,4 @@
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
struct Foo struct Foo
{ {

View file

@ -1,5 +1,5 @@
// PR c++/58500 // PR c++/58500
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
// { dg-options "" } // { dg-options "" }
struct A {}; struct A {};

View file

@ -1,5 +1,5 @@
// PR c++/58533 // PR c++/58533
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
void foo() void foo()
{ {

View file

@ -1,5 +1,5 @@
// PR c++/58534 // PR c++/58534
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
// { dg-options "" } // { dg-options "" }
template<typename> void foo(const auto&) {} template<typename> void foo(const auto&) {}

View file

@ -1,5 +1,5 @@
// PR c++/58535 // PR c++/58535
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
// { dg-options "" } // { dg-options "" }
struct A struct A

View file

@ -1,5 +1,5 @@
// PR c++/58536 // PR c++/58536
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
// { dg-options "" } // { dg-options "" }
struct A struct A

View file

@ -1,5 +1,5 @@
// PR c++/58548 // PR c++/58548
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
// { dg-options "" } // { dg-options "" }
void foo(auto) void foo(auto)

View file

@ -1,5 +1,5 @@
// PR c++/58549 // PR c++/58549
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
// { dg-options "" } // { dg-options "" }
void foo(auto) void foo(auto)

View file

@ -1,4 +1,4 @@
// PR c++/58637 // 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" } template<> void foo(auto); // { dg-error "auto|not a template" }

View file

@ -1,4 +1,4 @@
// { dg-do run { target c++1y } } // { dg-do run { target c++14 } }
template<typename, typename> template<typename, typename>
struct is_same struct is_same

View file

@ -1,4 +1,4 @@
// PR c++/59110 // PR c++/59110
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
int i = *(auto*)0; // { dg-error "" } int i = *(auto*)0; // { dg-error "" }

View file

@ -1,5 +1,5 @@
// PR c++/59112 // PR c++/59112
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
void foo() void foo()
{ {

View file

@ -1,5 +1,5 @@
// PR c++/59113 // PR c++/59113
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
void foo() void foo()
{ {

View file

@ -1,4 +1,4 @@
// PR c++/59629 // 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" } void foo(int i = []{ auto 0; }()); // { dg-error "expected|could not convert" }

View file

@ -1,5 +1,5 @@
// PR c++/59635 // PR c++/59635
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
auto f = [] (auto, ...) { return 0; }; auto f = [] (auto, ...) { return 0; };

View file

@ -1,4 +1,4 @@
// PR c++/59636 // PR c++/59636
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
auto f = []() { return []<>() {}; }; // { dg-error "expected identifier" } auto f = []() { return []<>() {}; }; // { dg-error "expected identifier" }

View file

@ -1,5 +1,5 @@
// PR c++/59638 // PR c++/59638
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
// { dg-options "" } // { dg-options "" }
void (*a)(auto); // { dg-error "" } void (*a)(auto); // { dg-error "" }

View file

@ -1,5 +1,5 @@
// PR c++/59867 // PR c++/59867
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
using namespace std; using namespace std;

View file

@ -1,5 +1,5 @@
// PR c++/60033 // PR c++/60033
// { dg-do compile { target c++1y } } // { dg-do compile { target c++14 } }
template <typename... T> template <typename... T>
auto f(T&&... ts) auto f(T&&... ts)

Some files were not shown because too many files have changed in this diff Show more