RE: [sv-bc] RE: [sv-ec] Is void function not implicitly declared inside the function

From: Steven Sharp <sharp_at_.....>
Date: Tue Jan 15 2008 - 12:39:06 PST
>From: "Brad Pierce" <Brad.Pierce@synopsys.com>

>The current draft (13.4.1) says that the implicit variable has the same
>type as the function return value.
> 
>But it also says that void functions do not have a return value.
> 
>So it should say that the definition of a void function does not declare
>an implicit variable.

I would agree.  That would make Surya's example legal.
 

>Also, in "The return statement shall override any value", shouldn't that
>be "overwrite"?

I would have regarded these as meaning pretty much the same thing.
However, Shalom brought up a possible distinction:

>And in any function, does a return statement with a value assign that
>value to the function variable? The LRM implies not, but does not say so
>explicitly.

Since I would expect a return statement to assign that value to the
function variable, "overwrite" would specify that more clearly.  Shalom
takes the word "override" as implying that it does not.

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 Jan 15 13:26:12 2008

This archive was generated by hypermail 2.1.8 : Tue Jan 15 2008 - 13:26:43 PST