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>
* read-rtl.c (apply_macro_to_string): Replace index with strchr.
......
......@@ -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]++;
......
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