[Issue 5417] New: Integer operations promote too much

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 5 18:19:53 PST 2011


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

           Summary: Integer operations promote too much
           Product: D
           Version: D2
          Platform: All
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: eatingstaples at gmail.com


--- Comment #0 from eatingstaples at gmail.com 2011-01-05 18:17:38 PST ---
Created an attachment (id=861)
Code with integer promotion

When summing two shorts, they should not be both promoted to int, especially
since this reduces the ability to pack things in registers.

I've attached code which demonstrates summing two shorts as they are both
promoted to int. The code will not build, with an error explaining that both
parameters have been promoted, leading to the expression being of type int
rather than short.

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