[Bug tree-optimization/58005] missed optimization printf constant string
daniel.santos at pobox dot com
gcc-bugzilla@gcc.gnu.org
Mon Sep 23 19:45:00 GMT 2013
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 joseph@codesourcery.com 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.
More information about the Gcc-bugs
mailing list