From fa141e9b3c41bab7728cda7cd5a3f672e0193797 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 10 May 2018 14:39:19 -0400 Subject: [PATCH] decl.c (make_typename_type): s/parameters/arguments/. * decl.c (make_typename_type): s/parameters/arguments/. * parser.c (cp_parser_nested_name_specifier_opt): Likewise. * pt.c (make_pack_expansion): Correct error message. From-SVN: r260121 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/decl.c | 2 +- gcc/cp/parser.c | 2 +- gcc/cp/pt.c | 4 ++-- gcc/testsuite/g++.dg/cpp0x/alignas9.C | 2 +- gcc/testsuite/g++.dg/cpp0x/variadic-ex13.C | 2 +- gcc/testsuite/g++.dg/template/type1.C | 2 +- 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e21afc7e09a..e70d3948eb1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2018-05-09 Jason Merrill + + * decl.c (make_typename_type): s/parameters/arguments/. + * parser.c (cp_parser_nested_name_specifier_opt): Likewise. + * pt.c (make_pack_expansion): Correct error message. + 2018-05-10 Jakub Jelinek PR c++/85662 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index fccddd54d69..d58964754b9 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3756,7 +3756,7 @@ make_typename_type (tree context, tree name, enum tag_types tag_type, if (TREE_CODE (name) == TEMPLATE_DECL) { if (complain & tf_error) - error ("%qD used without template parameters", name); + error ("%qD used without template arguments", name); return error_mark_node; } gcc_assert (identifier_p (name)); diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index f8ecf030c0d..88db9988bd4 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -6346,7 +6346,7 @@ cp_parser_nested_name_specifier_opt (cp_parser *parser, token->location); if (TREE_CODE (decl) == TEMPLATE_DECL) error_at (token->location, - "%qD used without template parameters", + "%qD used without template arguments", decl); else if (ambiguous_decls) { diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 180dfd6861c..e8346d3bf58 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -4007,9 +4007,9 @@ make_pack_expansion (tree arg, tsubst_flags_t complain) if (complain & tf_error) { if (TYPE_P (arg)) - error ("expansion pattern %qT contains no argument packs", arg); + error ("expansion pattern %qT contains no parameter packs", arg); else - error ("expansion pattern %qE contains no argument packs", arg); + error ("expansion pattern %qE contains no parameter packs", arg); } return error_mark_node; } diff --git a/gcc/testsuite/g++.dg/cpp0x/alignas9.C b/gcc/testsuite/g++.dg/cpp0x/alignas9.C index 98fe7077582..05d15ffe40b 100644 --- a/gcc/testsuite/g++.dg/cpp0x/alignas9.C +++ b/gcc/testsuite/g++.dg/cpp0x/alignas9.C @@ -2,5 +2,5 @@ // { dg-do compile { target c++11 } } template -struct A { alignas(int...) char c; }; // { dg-error "no argument packs|expected" } +struct A { alignas(int...) char c; }; // { dg-error "no parameter packs|expected" } A a; diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex13.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex13.C index 105208701bf..ca7ed33ac02 100644 --- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex13.C +++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex13.C @@ -32,7 +32,7 @@ template void f(Args...); template void g(Args... args) { f(const_cast(&args)...); // okay: ``Args'' and ``args'' are expanded - f(5 ...); // { dg-error "contains no argument packs" } + f(5 ...); // { dg-error "contains no parameter packs" } f(args); // { dg-error "5:parameter packs not expanded" } // { dg-message "args" "note" { target *-*-* } .-1 } f(h(args...) + args...); // okay: first ``args'' expanded within h, second ``args'' expanded within f. diff --git a/gcc/testsuite/g++.dg/template/type1.C b/gcc/testsuite/g++.dg/template/type1.C index b74d975ac49..0191ae55dfc 100644 --- a/gcc/testsuite/g++.dg/template/type1.C +++ b/gcc/testsuite/g++.dg/template/type1.C @@ -4,5 +4,5 @@ struct A { template struct B { static int c; }; }; -int A::B::c; // { dg-error "parameters" } +int A::B::c; // { dg-error "arguments" } int A::C::d; // { dg-error "declared" } -- 2.30.2