[Bug c/20319] -fkeep-static-consts with -O asserted doesn't keep consts
gary at intrepid dot com
gcc-bugzilla@gcc.gnu.org
Mon Jun 20 23:40:00 GMT 2005
------- Additional Comments From gary at intrepid dot com 2005-06-20 23:40 -------
I guess that tagging the bug with a "documentation" keyword doesn't
necessarily say that the bug is being classified only as a defect in the
documentation. However, if that is the meaning of this keyword, then I'd like
to clarify the bug report.
- yes, the documentation, source code commments and -help are either
incomplete or do not accurately describe present behavior.
- -fkepp-static-consts behaves in an unexpected manner, in that when asserted,
it enables a behavior that is already enabled by default. And interestingly,
it has no effect when optimization is enabled.
- Only -fno-keep-static-consts has an effect, and then only when optimization
is not enabled.
- In general, I think it would be best if switches which selectively control
optimizations, enable that optimization when asserted, and disable the
optimization when negatively asserted (ie, when prefixed with no- ...). Thus
I recommend that -fkeep-static-consts be deprecated, and replaced by a new
switch, named something like -fdelete-unused-static-consts. It would also be
a good idea to look at the other optimization enabling switches to ensure that
they follow this convention. Ideally, each optimization level such as O1, O2,
O3, Os, and Ot would be definitively and completely expressed by the selective
optimization options they enable.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20319
More information about the Gcc-bugs
mailing list