[sv-bc] array/struct literals

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Thu Jul 19 2007 - 03:14:33 PDT
This may be picky, but ...

5.10 says, "Structure literals are structure assignment patterns or
pattern expressions with constant member expressions."

Later appears an example

typedef struct {int a,b[4];} ab_t;
int a,b,c;
ab_t v1[1:0] [2:0];
v1 = '{2{'{3{a,'{2{b,c}}}}}};

The right-hand size of the assignment to v1 is an assignment pattern,
but its members are not constant expressions.

Similarly, 11.4.13 says,
"A concatenation is not the same as a structure literal (see 5.10) or an
array literal (see 5.11). Concatenations are enclosed in just braces ( {
} ), whereas structure and array literals are enclosed in braces that
begin with an apostrophe ( '{ } )."

Again, the distinction between a structure/array literal and an
assignment pattern is not kept.

Thanks,
Shalom



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


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Jul 19 03:16:18 2007

This archive was generated by hypermail 2.1.8 : Thu Jul 19 2007 - 03:16:32 PDT