Re: empty expression lists in return statements?

From: Ross Bencina (rossb@audiomulch.com)
Date: Thu Aug 24 2000 - 18:53:09 EDT


John Lazzaro wrote:
>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

But wouldn't the check would be: if( width != singleValued ) in most cases
anyway?

Given the current standard, using a zero width opcode in a composite
expression is "undefined" - semantically it is nonsense, so I don't think
your solution holds much water. Besides, it's not particularly efficient to
require zero return width udos to return 0.0 - and making all of the checks
necessary to optimise it away would be more work than changing your width
checking code.

Best wishes,

Ross.



This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 12:03:58 EST