> In C you can't use a void function as a value in an expression (it's type is
> void.) In SAOL I would suggest that likewise a UDO with a return width of
> zero may not be used in an expression. I can't see that this would increase
> compiler complexity as the width of a UDO has to be determined to
> width-check expressions anyway.
It would seem to add an extra check for zero-width expressions in the
main width checking routine, just for the one case ( <expr>; statement)
where its allowed to happen -- the sfront way ("opcodes default to scalar
return constant value of zero") avoids this, since a zero-width expression
can never happen and so never needs to be checked for. This complexity also
pushed into texts like the MP4-SA Book, where the current blanket statement of
"all expressions have widths >= 1" needs to be replaced with something
more complicated, or else left as a lie which is confessed in a later
chapter (along with all the rate-semantic lies :-),
--jl
-------------------------------------------------------------------------
John Lazzaro -- Research Specialist -- CS Division -- EECS -- UC Berkeley
lazzaro [at] cs [dot] berkeley [dot] edu www.cs.berkeley.edu/~lazzaro
-------------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 12:03:58 EST