From e19a77e63b5b2004eb8bd83cfecc87832149ef52 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Mon, 25 Jan 1993 06:37:20 +0000 Subject: [PATCH] (unary_expr => ANDAND identifier): Handle lookup_label returning 0. From-SVN: r3325 --- gcc/c-parse.in | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gcc/c-parse.in b/gcc/c-parse.in index 6ee9c81b987..a40dbfe089f 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -390,9 +390,15 @@ unary_expr: /* Refer to the address of a label as a pointer. */ | ANDAND identifier { tree label = lookup_label ($2); - TREE_USED (label) = 1; - $$ = build1 (ADDR_EXPR, ptr_type_node, label); - TREE_CONSTANT ($$) = 1; } + if (label == 0) + $$ = null_pointer_node; + else + { + TREE_USED (label) = 1; + $$ = build1 (ADDR_EXPR, ptr_type_node, label); + TREE_CONSTANT ($$) = 1; + } + } /* This seems to be impossible on some machines, so let's turn it off. You can use __builtin_next_arg to find the anonymous stack args. | '&' ELLIPSIS