http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58005
Daniel Santos <daniel.santos at pobox dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.santos at pobox dot com
--- Comment #5 from Daniel Santos <daniel.santos at pobox dot com> ---
(In reply to [email protected] from comment #3)
> Such an optimization can increase code size (well, the total size of
> string constants in the program) if the same format string is used with
> many different arguments, so it may not always be a good idea (at least
> with -Os).
Yeah, I agree. Such a subtle optimization would be bad for many people who
intentionally reuse a format string to reduce the data size and then only to
have that thwarted by the compiler. Typically, printfs don't reside in
performance sensitive sections of code.