Commit 22ab714d by Mark Mitchell Committed by Mark Mitchell

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
parent a82e1a7d
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> 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert diagnostics to use quoting flag q 7/n Convert diagnostics to use quoting flag q 7/n
......
...@@ -7765,7 +7765,7 @@ grokdeclarator (const cp_declarator *declarator, ...@@ -7765,7 +7765,7 @@ grokdeclarator (const cp_declarator *declarator,
&& ! bitfield) && ! bitfield)
{ {
error ("abstract declarator %qT used as declaration", type); 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. */ /* Only functions may be declared using an operator-function-id. */
......
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> 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
* g++.dg/overload/pmf1.C: Adjust quoting marks. * g++.dg/overload/pmf1.C: Adjust quoting marks.
......
// 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" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment