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
+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
}
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
--- /dev/null
+/* 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" } */
+};
+