diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-29 13:07:50 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-29 13:07:50 +0000 |
commit | 83e38fddcf292ad97b5e38bb28a7ed3bb5375510 (patch) | |
tree | b9d5557a30b82a405a27bfa8378836cfecbdbd21 /gcc/tree.c | |
parent | dff765100aee7b46b8b32a4e753e1a23a175daa9 (diff) | |
download | gcc-83e38fddcf292ad97b5e38bb28a7ed3bb5375510.tar.gz |
* tree.c (make_node_stat): Fix uninitialized warning. Replace
cascaded if ... else if with a switch.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88288 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 47 |
1 files changed, 33 insertions, 14 deletions
diff --git a/gcc/tree.c b/gcc/tree.c index c3912e9ee72..26b5f1b39ad 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -291,21 +291,40 @@ make_node_stat (enum tree_code code MEM_STAT_DECL) break; case tcc_exceptional: /* something random, like an identifier. */ - if (code == IDENTIFIER_NODE) - kind = id_kind; - else if (code == TREE_VEC) - kind = vec_kind; - else if (code == TREE_BINFO) - kind = binfo_kind; - else if (code == PHI_NODE) - kind = phi_kind; - else if (code == SSA_NAME) - kind = ssa_name_kind; - else if (code == BLOCK) - kind = b_kind; - else - kind = x_kind; + switch (code) + { + case IDENTIFIER_NODE: + kind = id_kind; + break; + + case TREE_VEC:; + kind = vec_kind; + break; + + case TREE_BINFO: + kind = binfo_kind; + break; + + case PHI_NODE: + kind = phi_kind; + break; + + case SSA_NAME: + kind = ssa_name_kind; + break; + + case BLOCK: + kind = b_kind; + break; + + default: + kind = x_kind; + break; + } break; + + default: + gcc_unreachable (); } tree_node_counts[(int) kind]++; |