RE: [sv-bc] E-mail Ballot: Respond by Wed Sep 05 8am PDT

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Tue Sep 04 2007 - 22:08:16 PDT
Mark, 

> SVDB 1988 ___Yes   _x__No  
> http://www.eda.org/svdb/bug_view_page.php?bug_id=1988
> I believe we should discuss whether this should be a warning 
> or an error. The old text could be confusing, but seemed to 
> indicate it was a warning. This new text clearly makes it an 
> error. I am not sure that is what users want.

Reminder to everyone: the issue is:

'13.4.2 says,

"Functions that return a value must be assigned or used in an
expression. Calling a nonvoid function as if it has no return value can
result in a warning message."

The first sentence implies that it is not possible to use a nonvoid
function like a void function. The second implies that it is possible,
just may give a warning.'

I would like to point out some additional sources:

13.2: "A nonvoid function shall return a single value". A statement can
not be a value.

13.4.1: "Function calls are expressions unless of type void, which are
statements." An expression is not a statement.

13.5: "A nonvoid function call is an operand within an expression."

I think all these make clear that it was not intended to allow a nonvoid
function call as a statement. Especially the first sentence quoted from
13.4.2, which uses the word "must".

The void cast exists exactly to allow users to do that. Otherwise, what
is the point?

Regards,
Shalom

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Sep 4 22:08:45 2007

This archive was generated by hypermail 2.1.8 : Tue Sep 04 2007 - 22:09:00 PDT