Bug 633 – Enum promotion rules are not specified

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2006-12-02T20:44:00Z
Last change time
2014-02-15T13:29:09Z
Keywords
spec
Assigned to
bugzilla
Creator
smjg
Blocks
511, 677

Comments

Comment #0 by smjg — 2006-12-02T20:44:57Z
The spec gives promotion rules for when typedef'd values are combined by arithmetical or other operations. As it happens, the spec needs to be clearer - see issue 632. However, it fails to give enums the same treatment. So the behaviour of these types when combined is undefined. We need to incorporate information on how these are treated into the spec. My opinion on this is the same as for typedefs - that the lowest common denominator principle is the best. For further commentary and rationale, please see http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=44821 Whatever we do, we must also make sure it's unambiguous what happens in the cases of enums of typedefs or vice versa.
Comment #1 by smjg — 2008-11-14T07:01:33Z
I see that the spec now says "typedef or enum" where previously it just said "typedef", thus reducing this to issue 632. So should this be marked as a dupe (and the summary of that one changed to say "Typedef/enum promotions spec ambiguous"), a dependent or what?
Comment #2 by smjg — 2008-12-31T11:28:11Z
*** This bug has been marked as a duplicate of 632 ***