AVR* Administrator
AVR* Administrator
Dave Hylands Sun 16 Apr 2017 11:11:13 PM CEST Calling printf("foo\n"); will be optimized to puts("foo"); so your test isn't really valid. Try omparing a program which uses printf("foo: %d\n",...
Mon 17 Apr 2017 08:18:07 AM CEST Ok, with printf("foo: %d\n, 42), the program is indeed smaller with by 264 bytes when -Wl,-u,vfprintf -lprintf_min is used than when none of...
Dave Hylands Mon 17 Apr 2017 06:46:35 PM CEST Using _Wl,-u,vfprintf is essentially forcing the symbol vfprintf to be undefined and added to the program. This is what's causing your...
Mon 17 Apr 2017 08:54:57 PM CEST You're correct, there's no reason when printf isn't being used to use those linker options. However: - realistically at least some linker options...
Dave Hylands Mon 17 Apr 2017 09:19:55 PM CEST I guess my point is that this statement (by itself) is false: "Note that if your program doesn't end up calling...
Joerg Wunsch Mon 17 Apr 2017 10:07:54 PM CEST Well, the fact that the -u vfprintf needs to be forced is an unfortunate side effect of libprintf_min.a **only** containing a...
Mon 17 Apr 2017 11:04:22 PM CEST If that's the case, why provide an optimized version of printf() for constant strings at all? I guess maybe it happens inevitably due...
Joerg Wunsch Tue 18 Apr 2017 08:02:58 AM CEST > I guess maybe it happens inevitably due to compiler > machinations. Exactly, it's a compiler thing we cannot influence.
Georg-Johann Lay Tue 09 May 2017 10:55:01 PM CEST Re. the "compiler thing" mentioned above: avr-gcc might replace a call to printf by a call to puts provided the arguments...
Thu 11 Aug 2016 11:49:46 AM CEST ...anyone? A month to have a simple "definitions missing from headers" report even acknowledged is silly.