aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2003-03-31 21:42:47 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2003-03-31 21:42:47 +0000
commit6b6652197a4e4ee17855e36f38a479896264eed2 (patch)
treedf6ff0b2f4e9cd952fe75ebdf0a15786e610c11f /gcc/c-common.c
parentb174e2d4cca9f4d629f563e4d0fec90606969deb (diff)
downloadgcc-6b6652197a4e4ee17855e36f38a479896264eed2.zip
gcc-6b6652197a4e4ee17855e36f38a479896264eed2.tar.gz
gcc-6b6652197a4e4ee17855e36f38a479896264eed2.tar.bz2
re PR c++/10278 (ICE in parser)
PR c++/10278 * c-common.c (finish_label_address_expr): Handle the error_mark_node. PR c++/10278 * g++.dg/parse/crash2.C: New test. From-SVN: r65116
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index ee4549c..65322df 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -4212,8 +4212,8 @@ c_add_case_label (cases, cond, low_value, high_value)
return case_label;
}
-/* Finish an expression taking the address of LABEL. Returns an
- expression for the address. */
+/* Finish an expression taking the address of LABEL (an
+ IDENTIFIER_NODE). Returns an expression for the address. */
tree
finish_label_address_expr (label)
@@ -4229,6 +4229,9 @@ finish_label_address_expr (label)
pedwarn ("ISO C forbids taking the address of a label");
}
+ if (label == error_mark_node)
+ return error_mark_node;
+
label = lookup_label (label);
if (label == NULL_TREE)
result = null_pointer_node;