[Issue 2390] New: Missing warning on conversion from int to char

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 3 21:14:14 PDT 2008


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

           Summary: Missing warning on conversion from int to char
           Product: D
           Version: 1.033
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: business3 at twistedpairgaming.com


The warning "implicit conversion of expression expr of type 'type' to 'type'
can cause loss of data" is not issued when converting an int to a char.

void main()
{
   int myInt = 999;
   byte b = myInt;  // Warning issued
}

void main()
{
   int myInt = 999;
   char c = myInt; // No warning issued
}


-- 



More information about the Digitalmars-d-bugs mailing list