Rearranging FP expressions

Rob Carriere rob at kaa.eng.ohio-state.edu
Wed Sep 28 00:30:03 AEST 1988


In article <4700017 at m.cs.uiuc.edu> wsmith at m.cs.uiuc.edu writes:
>[...]
>The problem:  How can C know when it is safe to rearrange expressions,
>		especially floating point expressions.
>
>A proposed solution:
>	Expressions enclosed in double parentheses may not be rearranged,
>	all other expressions may be rearranged in "semantically valid"
>	ways.
>[examples]

This could lead to trouble with macro expansions.  Otherwise it looks
fine to me at least.  Another way of doing this might be a pair of
pragma's, one to say ``hands off this one'', and one to say ``you can
totally optimize this''.

I know it is dubious whether the current standard allows such pragmae
(sp :-), but the original poster was talking about future efforts
anyway.

Rob Carriere



More information about the Comp.lang.c mailing list