diff options
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 3 |
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). */ |