Dave, I don't understand. First, I once asked what "or other constants" refers to. Steven Sharp wrote that he thinks it means "other static const variables". But even assuming that "or other constants" refers to "constant expressions", then you just have a list of possible components of an expression to be assigned to a const variable, one of which is constant expressions. You still could not conclude from that that hierarchical references are excluded from the entire list, only from that part of the list. Finally, I don't see that hierarchical references are excluded from "literals, parameters, local parameters, genvars, enumerated names". That quote does not say that the parameters, for examples, cannot be hierarchically referenced. Shalom > -----Original Message----- > From: owner-sv-ec@server.eda-stds.org [mailto:owner-sv-ec@server.eda- > stds.org] On Behalf Of Rich, Dave > Sent: Wednesday, August 09, 2006 12:11 AM > To: Brad Pierce; sv-ec@server.eda-stds.org > Subject: RE: [sv-ec] Initialisation of static data members > > It says "or other constants" > > In any case, a hierarchical name is not "an expression of literals, > parameters, local parameters, genvars, enumerated names, a constant > function of these, or other constants", so there is the contradictions. > > Dave > > > > -----Original Message----- > > From: owner-sv-ec@server.eda-stds.org [mailto:owner-sv-ec@server.eda- > > stds.org] On Behalf Of Brad Pierce > > Sent: Tuesday, August 08, 2006 2:02 PM > > To: sv-ec@server.eda-stds.org > > Subject: RE: [sv-ec] Initialisation of static data members > > > > The paragraph I quoted didn't use the phrase "constant expression". > > Where's the contradiction? > > > > -- Brad > > > > -----Original Message----- > > From: Rich, Dave [mailto:Dave_Rich@mentor.com] > > Sent: Tuesday, August 08, 2006 1:57 PM > > To: Brad Pierce; sv-ec@eda-stds.org > > Subject: RE: [sv-ec] Initialisation of static data members > > > > Then the LRM contradicts itself because the next sentence says: > > "Hierarchical names are allowed because constants declared with the > > const keyword are calculated after elaboration." > > > > Hierarchical names are not part of constant expressions. > > > > I think your example should be legal, although the LRM does not > mention > > any order dependencies. For random object stability, we already state > > that seeds are taken in the order they appear in the source, so I > don't > > see why we don't initialize variables in the order they appear within > a > > given scope. There should be no guarantees with hierarchical > references. > > > > In any case, calling a static method as part of a static > initialization > > of a class property should be legal. > > > > Dave > > > > > > > > > -----Original Message----- > > > From: owner-sv-ec@server.eda-stds.org > [mailto:owner-sv-ec@server.eda- > > > stds.org] On Behalf Of Brad Pierce > > > Sent: Tuesday, August 08, 2006 8:47 AM > > > To: sv-ec@server.eda-stds.org > > > Subject: Re: [sv-ec] Initialisation of static data members > > > > > > According to 6.3.5 -- > > > > > > "A static constant declared with the const keyword can be set to an > > > expression of literals, parameters, local parameters, genvars, > > > enumerated names, a constant function of these, or other constants. > > > [...] An automatic constant declared with the const keyword can be > set > > > > > to any expression that would be legal without the const keyword." > > > > > > >There are no special restrictions on the initializers of static > data > > > declarations > > > >or even const declarations. > > > > > > Wouldn't the following be illegal for a static constant c? > > > > > > int v = 0; > > > const int c = v; > > > > > > -- Brad > >Received on Wed Aug 9 05:16:59 2006
This archive was generated by hypermail 2.1.8 : Wed Aug 09 2006 - 05:17:32 PDT