RE: [sv-bc] Mantis 2097

From: Steven Sharp <sharp_at_.....>
Date: Thu Dec 13 2007 - 16:05:21 PST
>From: "Bresticker, Shalom" <shalom.bresticker@intel.com>

>Jim Vellenga wrote:
>
>I disagree with Shalom's interpretation that "a singular variable" does
>not include a reference to a member of an unpacked array variable. In
>fact, "6.4 Singular and aggregate types" says that "some functions
>recursively descend into an aggregate variable until reaching a singular
>value and then perform an operation on each singular value." Since the
>preceding paragraph identifies an unpacked array as belonging to an
>aggregate type, and any integral type as inherently "singular", this
>implies that a singular variable includes members of arrays when the
>member is of an integral type. Thus, as Steve Sharp noted, this allows a
>member of an array to serve as the left-hand side of a force, release,
>assign, or deassign, and is a major change to currently supported
>functionality.
>
>In fact, if we read it carefully, it also allows members of structs and
>unions to serve as the left-hand side of such statements.
>
>
>Any comments on what Jim wrote?

I will comment that Gord recently pointed out that the ability to
pass an element of an unpacked array or struct by reference relies
on accepting that such things qualify as "variables".  It is hard to
interpret "singular variable" as excluding a singular element of an
unpacked array or struct if we want to interpret "variable" as including
such things for purposes of ref args.

Of course, it would not hurt if we clarified what can be passed by
reference anyway.  If it specified that you could pass variables or
elements of unpacked array or struct variables, then it would avoid
this problem.

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 Thu Dec 13 16:05:43 2007

This archive was generated by hypermail 2.1.8 : Thu Dec 13 2007 - 16:06:00 PST