diff options
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index a08a2a5..408675b 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -4144,6 +4144,9 @@ finish_offsetof (tree object_ptr, tree expr, location_t loc) return expr; } + if (expr == error_mark_node) + return error_mark_node; + if (TREE_CODE (expr) == PSEUDO_DTOR_EXPR) { error ("cannot apply %<offsetof%> to destructor %<~%T%>", |