[sv-bc] 4.11 Structures and Unions

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Mon Oct 31 2005 - 04:04:52 PST
4.11 contains the following example:

typedef struct {
	int addr = 1 + constant;
	int crc;
	byte data [4] = '{4'{1}};
  } packet1;

Is the second apostrophe in "  '{4'{1}}  " correct ?
It does not seem consistent with other places in the standard, such as the following in 3.8:
"struct {int X,Y,Z;} XYZ = '{3{1}};".

(In general, the rules about placement of the apostrophes and curly brackets in literals do not seem clearly explained.)


Secondly, 4.11 also contains the following example:

typedef union tagged {
	struct {
		bit [4:0] reg1, reg2, regd;
		Add;
	union tagged {
		bit [9:0] JmpU;
		struct {
			bit [1:0] cc;
			bit [9:0] addr;
			JmpC;
	Jmp;
Instr;

This example seems to be missing closing right curly brackets before "Add;", before "JmpC;", before "Jmp;", and before "Instr;".


Thanks,
Shalom

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


Received on Mon Oct 31 04:05:03 2005

This archive was generated by hypermail 2.1.8 : Mon Oct 31 2005 - 04:06:37 PST