December 28, 2006 Re: std.stdio.write, writeln, fwrite, fwriteln | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lionello Lunesu Attachments: | The diff -u against files from 0.178. This patch also solves the following bug in doFormat: (a bug that has nothing to do with write/writeln, but is easily solvable because of them) #import std.stdio; #void main() { # const char[][] x = ["%s","123"]; # writefln(x); #} C:\dmd>dmd -run bug [Error: std.format This happens because doFormat is called recursively, once for each of the elements of the array. This means that there should never be any parsing for string elements, since there'll never be any 2nd argument to be formatted. Because the new doFormat takes the extra "bool parse" parameter, the fix is simple: invoke doFormat with parse set to false. L. |
December 28, 2006 Re: std.stdio.write, writeln, fwrite, fwriteln | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean Kelly | Sean Kelly wrote: >> ... because Mac OS X 10.3 / GCC 3.3 doesn't support >> templates fully, and GDC uses that for the TypeInfo... > > Thanks for pointing this out. I couldn't remember why the workarounds were necessary. I've worked on a back-port from Apple's GCC (which *does* support one-only linkage) to FSF GCC 3.3 (which doesn't), but haven't been able to get it out of the crashing stage. Then again, Intel Macs has made it (10.3) obsolete anyway. --anders PS. http://www.algonet.se/~afb/d/gcc-3.3.6-linkonce.patch (If you can make it work, please follow up to D.gnu!) |
Copyright © 1999-2021 by the D Language Foundation