This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Am 22.08.2016 um 18:09 schrieb Andy Ross:
The reproduction is straightforward. Just build any cross gcc with --enable-newlib (e.g. the one in the Zephyr SDK) and compile this (on any 32 or 64 bit 2's complement architecture) with newlib's headers. #include <stdint.h> extern void takes_fmt(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); void foo() { int32_t x = 42; takes_fmt("%d", x); }
Let me boil this down:That code is _wrong_. Trying to base any decision on its behaviour can only be wrong, too.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |