re PR c++/30854 (Wrong number of arguments printed for constructor)

PR c++/30854
	* error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
	argument to dump_aggr_init_expr_args instead of false.

	* g++.dg/parse/error30.C: New test.

From-SVN: r126582
This commit is contained in:
Jakub Jelinek 2007-07-12 14:05:39 +02:00 committed by Jakub Jelinek
parent 3746d8b1fa
commit 99c1f1ceed
4 changed files with 23 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2007-07-12 Jakub Jelinek <jakub@redhat.com>
PR c++/30854
* error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
argument to dump_aggr_init_expr_args instead of false.
2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
* typeck.c (comptypes): When USE_CANONICAL_TYPES, use the

View File

@ -1520,7 +1520,7 @@ dump_expr (tree t, int flags)
else
dump_expr (AGGR_INIT_EXPR_FN (t), 0);
}
dump_aggr_init_expr_args (t, flags, false);
dump_aggr_init_expr_args (t, flags, true);
break;
case CALL_EXPR:

View File

@ -1,3 +1,8 @@
2007-07-12 Jakub Jelinek <jakub@redhat.com>
PR c++/30854
* g++.dg/parse/error30.C: New test.
2007-07-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/29804

View File

@ -0,0 +1,11 @@
// PR c++/30854
// { dg-do compile }
struct A
{
A();
A(int);
};
A a = -A(); // { dg-error "no match for.*operator-.*in.*-A\\(\\)" }
A b = -A(5); // { dg-error "no match for.*operator-.*in.*-A\\(5\\)" }