[Issue 633] New: Enum promotion rules are not specified

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Dec 2 18:44:57 PST 2006


http://d.puremagic.com/issues/show_bug.cgi?id=633

           Summary: Enum promotion rules are not specified
           Product: D
           Version: 0.175
          Platform: All
               URL: http://www.digitalmars.com/d/type.html
        OS/Version: All
            Status: NEW
          Keywords: spec
          Severity: normal
          Priority: P2
         Component: www.digitalmars.com
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: smjg at iname.com
OtherBugsDependingO 511
             nThis:


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.


-- 




More information about the Digitalmars-d-bugs mailing list