aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 9855bac..10cf2a6 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8268,6 +8268,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, raises, attrli
error ("top-level declaration of `%s' specifies `auto'", name);
}
+ if (nclasses > 0 && friendp)
+ error ("storage class specifiers invalid in friend function declarations");
+
/* Now figure out the structure of the declarator proper.
Descend through it, creating more complex types, until we reach
the declared identifier (or NULL_TREE, in an absolute declarator). */