|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
D.gnu - 3 bugs printf:
WinXP & mingw32
gdc.exe (GCC) 3.4.5 (mingw special) (gdc 0.19, using dmd 0.162)
===========================================
$ cat fmt.d
import std.string;
void doNothing(char[] s) {
}
int main(char[][] args)
{
int i;
byte c = -1;
char ch;
ulong ul = 16301950722997352413UL;
printf("0x%016llX\n", ul);
printf("0x%02hhX\n", c); // Error: std.format formatArg
doNothing(format("0x%02hhX\n", c)); // Error: std.format formatArg
doNothing("here"~ch);
doNothing(format("// %d: %.*s\n", i, "there"));
return 0;
}
===========================================
dmd gives:
$ ./fmt.exe
0xE23C29CFA62DF7DD
0xFF
Error: std.format formatArg
===========================================
$ ./fmt.exe
0x00000000A62DF7DD
0xFFFF
Error: std.format formatArg
===========================================
Aug 22 2006
|