Commit c4b3f0eb by Nathan Sidwell Committed by Nathan Sidwell

tree.c (make_node_stat): Fix uninitialized warning.

	* tree.c (make_node_stat): Fix uninitialized warning.  Replace
	cascaded if ... else if with a switch.

From-SVN: r88288
parent dca3f2e9
2004-09-29 Nathan Sidwell <nathan@codesourcery.com>
* tree.c (make_node_stat): Fix uninitialized warning. Replace
cascaded if ... else if with a switch.
2004-09-29 Aaron W. LaFramboise <aaronavay62@aaronwl.com> 2004-09-29 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
* read-rtl.c (apply_macro_to_string): Replace index with strchr. * read-rtl.c (apply_macro_to_string): Replace index with strchr.
......
...@@ -291,22 +291,41 @@ make_node_stat (enum tree_code code MEM_STAT_DECL) ...@@ -291,22 +291,41 @@ make_node_stat (enum tree_code code MEM_STAT_DECL)
break; break;
case tcc_exceptional: /* something random, like an identifier. */ case tcc_exceptional: /* something random, like an identifier. */
if (code == IDENTIFIER_NODE) switch (code)
{
case IDENTIFIER_NODE:
kind = id_kind; kind = id_kind;
else if (code == TREE_VEC) break;
case TREE_VEC:;
kind = vec_kind; kind = vec_kind;
else if (code == TREE_BINFO) break;
case TREE_BINFO:
kind = binfo_kind; kind = binfo_kind;
else if (code == PHI_NODE) break;
case PHI_NODE:
kind = phi_kind; kind = phi_kind;
else if (code == SSA_NAME) break;
case SSA_NAME:
kind = ssa_name_kind; kind = ssa_name_kind;
else if (code == BLOCK) break;
case BLOCK:
kind = b_kind; kind = b_kind;
else break;
default:
kind = x_kind; kind = x_kind;
break; break;
} }
break;
default:
gcc_unreachable ();
}
tree_node_counts[(int) kind]++; tree_node_counts[(int) kind]++;
tree_node_sizes[(int) kind] += length; tree_node_sizes[(int) kind] += length;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment