> 7.1.1 "By default, structures are unpacked, meaning that there is no > defined representation on how each variable in the collection is > stored." Now a structure is said to be a collection of variables > instead of a collection of types. [SB] I would say that the representation of each variable is defined, but their packing is not, as written in 7.1.1.1: "An unpacked structure has an implementation-dependent packing, normally matching the C compiler." 7.1.1.1 brings me to say that I dislike going down to 4th level sub-clauses if it can be avoided. Instead of the following structure: 7.1 Structures and unions 7.1.1 Structures 7.1.2 Unions how about simply 7.1 Structures 7.2 Unions ? > 7.1.2 "A union is a data type that represents a single piece of > storage > which can store one of any variable type. Only one variable type can > be > in a union at one time." What is a variable type? [SB] The "one of" phrase is ambiguous. Does it allow this example from the LRM? typedef union packed { // default unsigned s_atmcell acell; bit [423:0] bit_slice; bit [52:0][7:0] byte_slice; } u_atmcell; I might think not. Mark suggested, "A union is a data type that represents a single piece of storage which can store several different variable types." I think that is ambiguous too. A structure might answer to that definition also. BTW, is there any problem with union { integer a; integer b; } cucu ; ? Shalom -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon Apr 16 01:58:48 2007
This archive was generated by hypermail 2.1.8 : Mon Apr 16 2007 - 01:58:57 PDT