[Issue 11101] Invalid enum member overflow message

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Sep 22 17:20:16 PDT 2013


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


Walter Bright <bugzilla at digitalmars.com> changed:

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


--- Comment #3 from Walter Bright <bugzilla at digitalmars.com> 2013-09-22 17:20:11 PDT ---
It should fail to compile with NONE larger than 110.

The algorithm is if GTokenType.LAST==GTokenType.max, then attempting to
calculate GTokenType.LAST+1 overflows it. To get what you are looking for,
use:

enum GtkRcTokenType
{
    INVALID = GTokenType.LAST + 1,
    INCLUDE,
}

which will compile successfully.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list