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

           Summary: Index of static array should not print literal suffix
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Kenji Hara <[email protected]> 2013-02-21 20:56:52 PST ---
Index type of static array is always size_t, so suffix is not only just
redundant, but also is harmful for platform independent diagnostic message.

  alias T = int[10];
  pragma(msg, T);
  // should print `int[10]` rather than `int[10u]` or `int[10LU]`.

Similar problem exists in IndexExp and SliceExp

  int[] arr;
  pragma(msg, (arr[0]).stringof);        // arr[cast(uint)0]
  pragma(msg, (arr[0..1]).stringof);     // arr[cast(uint)0..cast(uint)1]
  // should print arr[0] and arr[0..1]

But, it would need to keep "cast(...)" output for some cases

  pragma(msg, (arr[int.min]).stringof);  // arr[cast(uint)-2147483648]

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

Reply via email to