RE: [sv-bc] sign/width casting semantics

From: Feldman, Yulik <yulik.feldman_at_.....>
Date: Thu Jan 31 2008 - 06:13:16 PST
________________________________

From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org] On
Behalf Of Feldman, Yulik
Sent: Thursday, January 31, 2008 3:14 PM
To: Greg Jaxon; danielm
Cc: Brad Pierce; sv-bc
Subject: RE: [sv-bc] sign/width casting semantics

 

1.	6.24.1 says "When changing the signing, the type of the
expression to be cast shall pass through unchanged, except for the
signing", but it doesn't elaborate which direction of the "pass" is
affected, the upward, the downward, or both. 

 

[Yulik] After reading this sentence again, I now see that it says
"expression to be cast", so the intention should be for upward direction
only. This leaves the question of behavior for downward direction open.
However, taking into account that "the cast shall return the value that
a variable of the casting type would hold after being assigned the
expression" and 11.7.3, this leaves as with the only sensible option for
the downward direction is that the signedness of the context should not
be propagated in that direction. 

 

So, seemingly, the main open question is whether the operand of
signed'() is context- or self-determined (i.e. whether the size should
be propagated or not). I agree with recent Shalom's comments that there
are not many reasons to treat it as context-determined.


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner <http://www.mailscanner.info/> , and is

believed to be clean. 
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Jan 31 06:20:00 2008

This archive was generated by hypermail 2.1.8 : Thu Jan 31 2008 - 06:20:31 PST