Calypsi-tool-chains
Calypsi-tool-chains copied to clipboard
Printf is not handling some format specifiers correctly
Noticed with %ld and %lu:
` long x = 1984;
// this prints 'x is %ld', the value of x isn't substitued in the string // removing the 'l' will result in a compiler warning // "format specifies type 'int' but the argument has type 'long'" printf("x is %ld\n", x);
unsigned long y = 9000;
// this prints 'y is %lu', the value of y isn't substituted in the string. // removing the 'l' will result in a compiler warning. printf("y is %lu\n", y);`