Commit ff7437d0 by Simon Martin Committed by Simon Martin

re PR c++/34963 (ICE completely broken destructor)

gcc/cp/

2008-07-08  Simon Martin  <simartin@users.sourceforge.net>

	PR c++/34963
	* decl.c (grokdeclarator): Reset storage_class and staticp for friend
	functions declared with a storage class qualifier.

gcc/testsuite/

2008-07-08  Simon Martin  <simartin@users.sourceforge.net>

	PR c++/34963
	* g++.dg/parse/dtor13.C: New test.

From-SVN: r137637
parent b622a383
2008-07-08 Simon Martin <simartin@users.sourceforge.net>
PR c++/34963
* decl.c (grokdeclarator): Reset storage_class and staticp for friend
functions declared with a storage class qualifier.
2008-07-03 Richard Guenther <rguenther@suse.de>
PR c++/36128
......
......@@ -8036,7 +8036,11 @@ grokdeclarator (const cp_declarator *declarator,
}
if (storage_class && friendp)
error ("storage class specifiers invalid in friend function declarations");
{
error ("storage class specifiers invalid in friend function declarations");
storage_class = sc_none;
staticp = 0;
}
if (!id_declarator)
unqualified_id = NULL_TREE;
......
2008-07-08 Simon Martin <simartin@users.sourceforge.net>
PR c++/34963
* g++.dg/parse/dtor13.C: New test.
2008-07-07 H.J. Lu <hongjiu.lu@intel.com>
* gcc.dg/compat/struct-layout-1_generate.c (vector_types): Add
......
/* PR c++/34963 This used to ICE */
/* { dg-do "compile" } */
struct A
{
static friend A::~A(); /* { dg-error "storage class specifiers|extra qualification|implicitly friend" } */
};
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