[sv-bc] assignment-like contexts

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Tue Sep 11 2007 - 00:06:04 PDT
The term "assignment-like context" is defined in 10.8 (in Draft 3a), in
the sub-clause on assignment patterns.

(It is used in 5.10 and 5.11, on structure and array literals, without
any cross-reference or explanation there.)

But the definition has general implications, because an assignment-like
context means that you consider the left-hand side when determining bit
size. There are other implications as well. 

So I think this part of 10.8 should be taken out of 10.8 and made into
its own sub-clause in Clause 10 (Assignment statements), preferably
before 10.8.

The text to move is:

An assignment-like context is as follows:
- A continuous or procedural assignment
- For a parameter with an explicit type declaration:
- A parameter value assignment in a module, interface, program, or class
- A parameter value override in the instantiation of a module,
interface, or program
- A parameter value override in the instantiation of a class or in the
left-hand side of a class scope operator
- A port connection to an input or output port of a module, interface,
or program
- The passing of a value to a subroutine input, output, or inout port
- A return statement in a function
- A tagged union expression
- For an expression that is used as the right-hand value in an
assignment-like context:
- If a parenthesized expression, then the expression within the
parentheses
- If a mintypmax expression, then the colon-separated expressions
- If a conditional operator expression, then the second and third
operand
- A nondefault correspondence between an expression in an assignment
pattern and a field or element in a data object or data value
No other contexts shall be considered assignment-like contexts. In
particular, none of the following shall be considered assignment-like
contexts:
- A static cast
- A default correspondence between an expression in an assignment
pattern and a field or element in a data object or data value
- A port expression in a module, interface, or program declaration
- The passing of a value to a subroutine ref port
- A port connection to an inout or ref port of a module, interface, or
program

In 10.8, in the sentence, 
"An assignment pattern has no self-determined data type, but can be used
as one of the sides in an assignment-like context (see below) when the
other side has a self-determined data type",
the phrase "(see below)" should be changed appropriately.

In 5.10 and 5.11, the references to assignment-like context should have
xrefs added.

Any objections?

Shalom Bresticker
Intel Jerusalem LAD DA
+972 2 589-6852
+972 54 721-1033

---------------------------------------------------------------------
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 Tue Sep 11 00:07:08 2007

This archive was generated by hypermail 2.1.8 : Tue Sep 11 2007 - 00:07:34 PDT