Google C++ needs for Clang

Adam D. Ruppe destructionator at gmail.com
Mon May 23 16:00:08 PDT 2011


> D/DMD is not modern/intelligent/good enough to catch this common
> error yet, this gives no errors nor warnings in D2:

If you write the literal though, you do get the error:

        int kMaxDiskSpace = 10737418240;

test66.d(6): Error: cannot implicitly convert expression (10737418240L) of type
long to int

This might be a bug in the compiler's constant folding, since it
catches one form but not the other.


The other two errors in that blog are done by D right now, despite
it being obsolete, stupid, and not good enough yet.


More information about the Digitalmars-d mailing list