aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-01-25 06:37:20 +0000
committerRichard Stallman <rms@gnu.org>1993-01-25 06:37:20 +0000
commite19a77e63b5b2004eb8bd83cfecc87832149ef52 (patch)
treebdb4c8926d55c304aa93e628fdcc6f0fdd29201d
parent7d9795e55251f0bbd8ae853c2aca0f35dba431e3 (diff)
downloadgcc-e19a77e63b5b2004eb8bd83cfecc87832149ef52.zip
gcc-e19a77e63b5b2004eb8bd83cfecc87832149ef52.tar.gz
gcc-e19a77e63b5b2004eb8bd83cfecc87832149ef52.tar.bz2
(unary_expr => ANDAND identifier): Handle lookup_label returning 0.
From-SVN: r3325
-rw-r--r--gcc/c-parse.in12
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/c-parse.in b/gcc/c-parse.in
index 6ee9c81..a40dbfe 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