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 47732cb..48f8d8c 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -7348,6 +7348,9 @@ grokdeclarator (const cp_declarator *declarator,
declarator->u.pointer.class_type);
type = build_pointer_type (type);
}
+ else if (declarator->u.pointer.class_type == error_mark_node)
+ /* We will already have complained. */
+ type = error_mark_node;
else
type = build_ptrmem_type (declarator->u.pointer.class_type,
type);