[Bug c/69981] -f[no]keep-static-consts has no effect
equinox-gccbugs at diac24 dot net
gcc-bugzilla@gcc.gnu.org
Fri Feb 26 14:16:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69981
--- Comment #2 from David L. <equinox-gccbugs at diac24 dot net> ---
(In reply to Jakub Jelinek from comment #1)
> I disagree, removing static consts is an optimization, if you tell the
> compiler not to optimize, it doesn't perform the optimizations.
Documentation bug then? It says it's independent of optimization.
-fkeep-static-consts
Emit variables declared static const when optimization isn't turned on,
even if the variables aren't referenced.
GCC enables this option by default. If you want to force the compiler to
check if a variable is referenced, regardless of whether or not
optimization
is turned on, use the -fno-keep-static-consts option.
More information about the Gcc-bugs
mailing list