Integer conversions too pedantic in 64-bit
bearophile
bearophileHUGS at lycos.com
Tue Feb 15 10:10:49 PST 2011
Daniel Gibson:
> void main() {
> size_t x;
> writefln(typeof(x).stringof);
> }
> try this, too ;-)
>
> Because it's an alias the information about size_t gone at runtime and
> the "real" type is shown. uint in your case. (Here - gdc on amd64 - it's
> ulong).
I think both typeof() and stringof are compile-time things.
And regarding lost alias information I suggest to do as Clang does:
http://d.puremagic.com/issues/show_bug.cgi?id=5004
Bye,
bearophile
More information about the Digitalmars-d
mailing list