This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/20319] -fkeep-static-consts with -O asserted doesn't keep consts
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Mar 2005 18:29:50 -0000
- Subject: [Bug c/20319] -fkeep-static-consts with -O asserted doesn't keep consts
- References: <20050304170516.20319.gary@intrepid.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-04 18:29 -------
Nope, -fkeep-static-consts only control when optimization is not on:
>From the docs:
Emit variables declared @code{static const} when optimization ____isn't____ turned
on, even if the variables aren't referenced.
Enphise mine.
Use the "used" attribute if you want to keep unused constants.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20319