tree.c (tree_class_check): Add braces to eliminate ambigious else warning.

* tree.c (tree_class_check): Add braces to eliminate ambigious
        else warning.
        (tree_check): Likewise.

From-SVN: r20325
This commit is contained in:
Graham Stott 1998-06-07 19:59:23 -06:00 committed by Jeff Law
parent 49fa02d9d6
commit 79990a3950
2 changed files with 20 additions and 10 deletions

View File

@ -1,3 +1,9 @@
Mon Jun 8 02:55:56 1998 Graham <grahams@rcp.co.uk>
* tree.c (tree_class_check): Add braces to eliminate ambigious
else warning.
(tree_check): Likewise.
Mon Jun 8 02:49:23 1998 H.J. Lu (hjl@gnu.org)
* reg-stack.c (subst_stack_regs_pat): Make sure the top of

View File

@ -4951,11 +4951,13 @@ tree_check (node, code, file, line, nofatal)
int nofatal;
{
if (TREE_CODE (node) != code)
if (nofatal)
return 0;
else
fatal ("%s:%d: Expect %s, have %s\n", file, line,
tree_code_name[code], tree_code_name[TREE_CODE (node)]);
{
if (nofatal)
return 0;
else
fatal ("%s:%d: Expect %s, have %s\n", file, line,
tree_code_name[code], tree_code_name[TREE_CODE (node)]);
}
return node;
}
@ -4971,11 +4973,13 @@ tree_class_check (node, cl, file, line, nofatal)
int nofatal;
{
if (TREE_CODE_CLASS (TREE_CODE (node)) != cl)
if (nofatal)
return 0;
else
fatal ("%s:%d: Expect '%c', have '%s'\n", file, line,
cl, tree_code_name[TREE_CODE (node)]);
{
if (nofatal)
return 0;
else
fatal ("%s:%d: Expect '%c', have '%s'\n", file, line,
cl, tree_code_name[TREE_CODE (node)]);
}
return node;
}