variations of int sizes (and signded/unsigned) between platorms

Jason House jason.james.house at gmail.com
Tue Apr 24 19:20:15 PDT 2007


Daniel Keep wrote:
> find should probably be returning ptrdiff_t, since that looks like what
> you're getting.  If you try casting startComment to size_t on line 105,
> that should work.
> 
> FYI:
>           | 32-bit alias | 64-bit alias |
> size_t    |     uint     |     ulong    |
> ptrdiff_t |     int      |     long     |
> 
> Hope that helps.
> 
> 	-- Daniel
> 

It would help if the various distributions were consistent.  Digging a 
little, it appears that gdc for AMD64 returns ptrdiff_t while the code 
that comes with dmd returns int.  Also, 
http://www.digitalmars.com/d/phobos/std_string.html also says int.


More information about the Digitalmars-d-learn mailing list