Re: [sv-bc] query regarding $bits function

From: Steven Sharp <sharp_at_.....>
Date: Tue Feb 05 2008 - 21:39:05 PST
>From: Surya Pratik Saha <spsaha@cal.interrasystems.com>

>I understand your point, that - to get the width of a function call 
>having dynamic return type the function needs to be evaluated and that 
>can cause side effect. To avoid that it is restricted to be used in $bits.
>But this is very generic restriction, all functions don't cause side 
>effect. We can easily filter out those by imposing constant function 
>restriction on that.

You could.  But if you are trying to determine compliance of an
implementation, you should follow what is actually in the LRM.
The text is clear that an implementation is not to evaluate the
expression, whether it has side-effects or not.  And for that
reason, the expression must not contain any calls to functions
that return dynamic results.  The wording is not perfect, but it
seems clear enough that this testcase is illegal.

Steven Sharp
sharp@cadence.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Feb 5 21:39:47 2008

This archive was generated by hypermail 2.1.8 : Tue Feb 05 2008 - 21:40:14 PST