RE: [sv-bc] 4.10.4 "Enumerated types in numerical expressions" - unclearness

From: Rich, Dave <Dave_Rich_at_.....>
Date: Thu Apr 13 2006 - 14:13:55 PDT
The reference to "arguments is not needed, it is covered as an
assignment context.

 

The term "auto-cast" really should be 'assignment-compatible' which
means 'does not need an explicit cast'

 

The semantics for relational operations of enums needs to be clarified.
If one operand is an enum and the other is integral, the enum is cast to
an integral value before being compared. If both operands are
non-matching enums, that is a type compatibility error.

 

Dave

 

________________________________

From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Brad
Pierce
Sent: Thursday, April 13, 2006 1:32 PM
To: sv-bc@eda.org
Subject: Re: [sv-bc] 4.10.4 "Enumerated types in numerical expressions"
- unclearness

 

Following up on http://www.eda.org/sv-bc/hm/3372.html , what does the
LRM mean in 4.10.3 when it says "Enumerated variables are type-checked
in [...] arguments [...] and relational operators", especially as they
are also said to be "auto-cast into integral values".  Are there any
examples of this alleged type checking in the LRM?

 

-- Brad

 

 

 
Received on Thu Apr 13 14:14:06 2006

This archive was generated by hypermail 2.1.8 : Thu Apr 13 2006 - 14:14:14 PDT