https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54303
Clément Péron <peron.clem at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |peron.clem at gmail dot com
--- Comment #12 from Clément Péron <peron.clem at gmail dot com> ---
The Bugs is still present in GCC 4.6.4 and 4.8.2.
.strX.X try to optimize string constants but when you disable it the var are
moved into .rodata instead of .rodata.__function when the -fdata-sections is
enabled.
I post a question on StackOverflow :
http://stackoverflow.com/questions/26100976/var-declare-inside-a-printf-cant-be-garbage-collected-by-gcc?answertab=oldest#tab-top
And i sent a message on GCC-Help mailing list :
https://gcc.gnu.org/ml/gcc-help/2014-10/msg00000.html
It's really annoying when you try to optimize the size of the executable.
Thanks