[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc
Subject:    Re: Unused case statements in expand_expr
From:       Nick Burrett <nick.burrett () btinternet ! com>
Date:       1998-06-24 10:54:17
[Download RAW message or body]


>    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.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic