mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-19 05:10:25 +08:00
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
This commit is contained in:
parent
b622a383be
commit
ff7437d077
@ -1,3 +1,9 @@
|
||||
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;
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
8
gcc/testsuite/g++.dg/parse/dtor13.C
Normal file
8
gcc/testsuite/g++.dg/parse/dtor13.C
Normal file
@ -0,0 +1,8 @@
|
||||
/* 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" } */
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user