DIP(?) Warning to facilitate porting to other archs

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Sun Aug 31 23:01:00 PDT 2014


"Marco Leise"  wrote in message 
news:20140831232805.7fe19a60 at marco-leise.homedns.org...

> size_t = ulong; // breaks when porting from 64 to 32 bit
>   uint = size_t;  // breaks when porting from 32 to 64 bit
>
> which is obviously broken, but accepted. I would really like
> to force people to change their code to make the compiler shut
> up. See some of the linked bugs for examples:
> https://issues.dlang.org/show_bug.cgi?id=5063#c4
>

Maybe it's just my history with C, but I'm always really pleased when this 
kind of code errors out the first time it's compiled on 64-bit.

Since dmd is always a cross-compiler, just can just stick -m64/-m32 on your 
command line and test the other type of size_t.  Even if you're on windows, 
and don't have the 64-bit toolchain set up, you will get all these errors 
from semantic. 



More information about the Digitalmars-d mailing list