[Issue 4623] New: Non-integer type allowed as static array size

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 11 11:44:24 PDT 2010


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

           Summary: Non-integer type allowed as static array size
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: ibuclaw at ubuntu.com


--- Comment #0 from Iain Buclaw <ibuclaw at ubuntu.com> 2010-08-11 11:44:22 PDT ---
The code:

void main()
{
    int[0.128] a;
}

Should not compile, rather error with the message stating that either the size
of array 'a' has non-integer type, or that the compiler cannot implicitly
convert expression (0.128) of type double to uint.

See: http://dstress.kuehne.cn/nocompile/o/opIndex_05.d

Regards

-- 
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