www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 633] New: Enum promotion rules are not specified

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: smjg 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.


-- 
Dec 02 2006
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=633






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?


-- 
Nov 14 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=633


smjg iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE







*** This bug has been marked as a duplicate of 632 ***


-- 
Dec 31 2008