diff options
author | Simon Martin <simartin@users.sourceforge.net> | 2008-07-08 18:41:35 +0000 |
---|---|---|
committer | Simon Martin <simartin@gcc.gnu.org> | 2008-07-08 18:41:35 +0000 |
commit | ff7437d0772a8a4a69b1eea2aade9835bbbe76fc (patch) | |
tree | 5bed06648ad07b024f1407e8d2b7a160d76bdd9d /gcc/cp | |
parent | b622a383be65aaf3ed882495aa71a12fc18426d5 (diff) | |
download | gcc-ff7437d0772a8a4a69b1eea2aade9835bbbe76fc.zip gcc-ff7437d0772a8a4a69b1eea2aade9835bbbe76fc.tar.gz gcc-ff7437d0772a8a4a69b1eea2aade9835bbbe76fc.tar.bz2 |
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
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/decl.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5ef7e2e..75435cf 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index a5a5574..fc76ebe 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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; |