[dmd-beta] dmd 1.062 and 2.047 beta
Sean Kelly
sean at invisibleduck.org
Thu Jun 10 10:55:42 PDT 2010
line 1332 looks wrong:
enforce(fprintf(.stdout.p.handle, "%*s\n",
should be
enforce(fprintf(.stdout.p.handle, "%.*s\n",
and since this has come up, what I absolutely hate about the "%.*s" syntax is that the C standard requires that the length be an int, while size_t is almost always used to represent buffer size. In a 64-bit app a cast to int is necessary to avoid weird results. So 1333 should be:
cast(int) args[0].length, args[0].ptr) >= 0);
On Jun 10, 2010, at 5:45 AM, Richard Webb wrote:
>
> Using 2.047 on Windows 2008, i see the code
>
> char[3] tmp = ['a', 'b', 'c'];
> writeln(tmp);
>
> print abc<randombytes> (in debug builds at least).
>
> possibly because the change in
> http://www.dsource.org/projects/phobos/changeset/1611 doesn't handle non-null
> terminated character arrays?
>
>
> _______________________________________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
More information about the dmd-beta
mailing list