64Bit compatibility warnings

Stewart Gordon smjg_1998 at yahoo.com
Fri Jan 20 16:48:05 PST 2012


On 20/01/2012 00:46, Peter Alexander wrote:
> On 20/01/12 12:25 AM, Trass3r wrote:
>> Could we please have at least a warning if code isn't compatible with
>> 64Bit?
>> It's really annoying to test out some code and having to fix a bunch of
>> stupid uint->size_t bugs just because the author is still on a 32 bit
>> machine.
>>
>> Is that feasible?
>
> In general, no. What you're asking is for the compiler to compile your code twice, once
> for 32-bit and once for 64-bit.

No it isn't.  It's basically asking to make size_t/ptrdiff_t not implicitly convertible to 
uint/int, or at least issue a warning if you implicitly convert between them.

At least some Microsoft C++ complier versions have this warning.

Stewart.


More information about the Digitalmars-d mailing list