From a9dc9d376cad156b902b410de4381f5873618633 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Tue, 10 May 2011 19:52:39 +0000 Subject: [PATCH] make CASE_LABEL_EXPR not abuse TREE_CHAIN make CASE_LABEL_EXPR not abuse TREE_CHAIN * tree.def (CASE_LABEL_EXPR): Add an operand. * tree.h (CASE_CHAIN): Use TREE_OPERAND instead of TREE_CHAIN. From-SVN: r173633 --- gcc/ChangeLog | 5 +++++ gcc/tree.def | 2 +- gcc/tree.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 410bc2641e0..671cc540d64 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-05-10 Nathan Froyd + + * tree.def (CASE_LABEL_EXPR): Add an operand. + * tree.h (CASE_CHAIN): Use TREE_OPERAND instead of TREE_CHAIN. + 2011-05-10 Joseph Myers * c-decl.c (c_override_global_bindings_to_false): Remove. diff --git a/gcc/tree.def b/gcc/tree.def index eb94ad24593..9c6606d0c9c 100644 --- a/gcc/tree.def +++ b/gcc/tree.def @@ -863,7 +863,7 @@ DEFTREECODE (SWITCH_EXPR, "switch_expr", tcc_statement, 3) CASE_HIGH, respectively. If CASE_LOW is NULL_TREE, the label is a 'default' label. If CASE_HIGH is NULL_TREE, the label is a normal case label. CASE_LABEL is the corresponding LABEL_DECL. */ -DEFTREECODE (CASE_LABEL_EXPR, "case_label_expr", tcc_statement, 3) +DEFTREECODE (CASE_LABEL_EXPR, "case_label_expr", tcc_statement, 4) /* Used to represent an inline assembly statement. ASM_STRING returns a STRING_CST for the instruction (e.g., "mov x, y"). ASM_OUTPUTS, diff --git a/gcc/tree.h b/gcc/tree.h index 4cf1730d4cb..529613c0c9c 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1689,7 +1689,7 @@ extern void protected_set_expr_location (tree, location_t); #define CASE_LOW(NODE) TREE_OPERAND (CASE_LABEL_EXPR_CHECK (NODE), 0) #define CASE_HIGH(NODE) TREE_OPERAND (CASE_LABEL_EXPR_CHECK (NODE), 1) #define CASE_LABEL(NODE) TREE_OPERAND (CASE_LABEL_EXPR_CHECK (NODE), 2) -#define CASE_CHAIN(NODE) TREE_CHAIN (CASE_LABEL_EXPR_CHECK (NODE)) +#define CASE_CHAIN(NODE) TREE_OPERAND (CASE_LABEL_EXPR_CHECK (NODE), 3) /* The operands of a TARGET_MEM_REF. Operands 0 and 1 have to match corresponding MEM_REF operands. */ -- 2.30.2