This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Unused case statements in expand_expr
- To: gcc2 at cygnus dot com, egcs at cygnus dot com
- Subject: Unused case statements in expand_expr
- From: Nick Burrett <nick dot burrett at btinternet dot com>
- Date: Tue, 23 Jun 1998 16:44:55 +0100
In `expand_expr' we have:
case FIX_ROUND_EXPR:
case FIX_FLOOR_EXPR:
case FIX_CEIL_EXPR:
abort (); /* Not used for C. */
Since expr.c is `supposed' to be language-independent then can I remove
these case statements ? The end result is that `abort' will be called anyway.
It also means that languages that wish to implement any of those codes
can provide them in a language specific hook through the default case
`lang_expand_expr'.
Nick.
<date> Nick Burrett <nick.burrett@btinternet.com>
* expr.c (expand_expr, case FIX_ROUND_EXPR): Remove.
(expand_expr, case FIX_FLOOR_EXPR, FIX_CEIL_EXPR): Remove.
*** expr.c.orig Tue Jun 23 16:31:39 1998
--- expr.c Tue Jun 23 16:35:15 1998
*************** expand_expr (exp, target, tmode, modifie
*** 6632,6648 ****
if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1), 1))
subtarget = 0;
op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0);
op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0);
return expand_divmod (1, code, mode, op0, op1, target, unsignedp);
- case FIX_ROUND_EXPR:
- case FIX_FLOOR_EXPR:
- case FIX_CEIL_EXPR:
- abort (); /* Not used for C. */
-
case FIX_TRUNC_EXPR:
op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0);
if (target == 0)
target = gen_reg_rtx (mode);
expand_fix (target, op0, unsignedp);
return target;
--- 6632,6643 ----