[Issue 6583] New: cast() operation not fully specified

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Aug 30 22:42:01 PDT 2011


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

           Summary: cast() operation not fully specified
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: websites
        AssignedTo: nobody at puremagic.com
        ReportedBy: cokebuttle at gmail.com


--- Comment #0 from Lennart Blanco <cokebuttle at gmail.com> 2011-08-30 22:41:57 PDT ---
The D2 language specification does not fully define the conversation performed
by cast() operation,
http://d-programming-language.org/expression.html#CastExpression.

For example cast() between basic data types of different sizes and signess is
not described.

e.g:

  int a;
  byte b = cast(int)a;

Casting pointers to basic data types is also not described.

I think the specification should define when the value is truncated, sign
extended or copied bit-by-bit, etc.

Maybe a reference to relevant C language specification would solve this issue.

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