* decl.c: Revert unwanted commit.
[gcc.git] / gcc / cp / decl.c
index fa9fcc8da9b52a35ba33c91a43d8364044bb0cc4..d883da6b6406a84fc85990ef784f5ea63995cd92 100644 (file)
@@ -9194,6 +9194,11 @@ grokdeclarator (const cp_declarator *declarator,
                error ("%qs declared as function returning an array", name);
                return error_mark_node;
              }
+           /* When decl_context == NORMAL we emit a better error message
+              later in abstract_virtuals_error.  */
+           if (decl_context == TYPENAME && ABSTRACT_CLASS_TYPE_P (type))
+             error ("%qs declared as function returning an abstract "
+                    "class type", name);
 
            /* Pick up type qualifiers which should be applied to `this'.  */
            memfn_quals = declarator->u.function.qualifiers;