This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Unused case statements in expand_expr
- To: law at cygnus dot com
- Subject: Re: Unused case statements in expand_expr
- From: Nick Burrett <nick dot burrett at btinternet dot com>
- Date: Wed, 24 Jun 1998 11:54:17 +0100
- CC: gcc2 at cygnus dot com, egcs at cygnus dot com
- References: <21124.898661880@hurl.cygnus.com>
> In message <199806231544.QAA07673@nick.btinternet.com>you write:
> >
> > 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'.
>
> But if they're useful for more than one language, then you have to
> duplicate code.
>
> Seems to me that if you've had to implement support for these nodes
> that we can/should just drop your implementation into expand_expr.
OK. I'm convinced now. :-)
I am going to have to take the plunge and implement FIX_ROUND_EXPR,
FIX_FLOOR_EXPR and FIX_CEIL_EXPR. A quick look shows a fair amount of work
to be done, such as adding rounding-mode support to config/fp-bit.c and
hacking optabs.c to support the IEEE rounding modes, so don't expect anything
too soon.
Nick.