re PR c++/17393 ("unused variable '._0'" warning with -Wall)

PR c++/17393
	* decl.c (grokdeclarator): Robustify error-recovery on invalid
	declarations.

	PR c++/17393
	* g++.dg/parse/error21.C: New test.

From-SVN: r88855
This commit is contained in:
Mark Mitchell 2004-10-10 21:49:27 +00:00 committed by Mark Mitchell
parent a82e1a7d18
commit 22ab714dcc
4 changed files with 24 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2004-10-10 Mark Mitchell <mark@codesourcery.com>
PR c++/17393
* decl.c (grokdeclarator): Robustify error-recovery on invalid
declarations.
2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert diagnostics to use quoting flag q 7/n

View File

@ -7765,7 +7765,7 @@ grokdeclarator (const cp_declarator *declarator,
&& ! bitfield)
{
error ("abstract declarator %qT used as declaration", type);
unqualified_id = make_anon_name ();
return error_mark_node;
}
/* Only functions may be declared using an operator-function-id. */

View File

@ -1,3 +1,8 @@
2004-10-10 Mark Mitchell <mark@codesourcery.com>
PR c++/17393
* g++.dg/parse/error21.C: New test.
2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
* g++.dg/overload/pmf1.C: Adjust quoting marks.

View File

@ -0,0 +1,12 @@
// PR c++/17393
// { dg-options "-Wall" }
struct A { };
void foo()
{
// Check that we do not complain about an unused
// compiler-generated variable.
A& = a; // { dg-error "token|declarator|not declared" }
}