RE: [sv-bc] "Assignment ... to a constant expression"

From: Steven Sharp <sharp_at_.....>
Date: Fri Apr 25 2008 - 14:33:04 PDT
>From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
>Bresticker, Shalom
>
>By the way, I just found the following example in 6.19.5.7:
>
>typedef enum { red, green, blue, yellow } Colors;
>Colors c = c.first;
>
>This indicates that the 'point of declaration' is before the
>initializing expression (as I would personally would expect).

Or at least that the person writing the example thought so.  Given that
the question has never been brought up and resolved in committee, I
don't think we can consider this example definitive.

It does point out a situation where the self-reference actually has a
useful purpose.


>From: "Brad Pierce" <Brad.Pierce@synopsys.com>
>
>Shalom,
>
>Would that initialization be legal for a static variable?  The question
>is related to
>
>    http://www.eda-stds.org/sv-bc/hm/8044.html

That email related to whether a built-in method call qualified as a
constant expression.  But since this whole discussion started with the
fact that initializers aren't required to be constant expressions any
more, I don't think it applies.

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 Fri Apr 25 14:52:12 2008

This archive was generated by hypermail 2.1.8 : Fri Apr 25 2008 - 14:52:58 PDT