public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/23344] New: RFE: explicit section attribute disables the unused static const optimization
@ 2005-08-11 21:36 gary at intrepid dot com
  2005-08-11 21:55 ` [Bug c/23344] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: gary at intrepid dot com @ 2005-08-11 21:36 UTC (permalink / raw)
  To: gcc-bugs

Related discussion:
http://gcc.gnu.org/ml/gcc/2005-03/msg00181.html
Related bug reports: Bug #20319, Bug #20321

This enhancement request that was part of #20321.
Refiling as an explicit enhancement request.

If an explicit section attribute
is supplied for a static constant declaration (where the declaration
is not otherwise referenced), do not eliminate the static constant
definition.  The rationale for this policy is that it is
reasonable to assume that if the user is explicitly assigning the
static constant to a named section, then he/she intends to use that
static constant defintion, and does not want it eliminated from the
executable image.

-- 
           Summary: RFE: explicit section attribute disables the unused
                    static const optimization
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gary at intrepid dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23344


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/23344] RFE: explicit section attribute disables the unused static const optimization
  2005-08-11 21:36 [Bug c/23344] New: RFE: explicit section attribute disables the unused static const optimization gary at intrepid dot com
@ 2005-08-11 21:55 ` pinskia at gcc dot gnu dot org
  2005-08-11 22:50 ` giovannibajo at libero dot it
  2005-08-11 23:16 ` gary at intrepid dot com
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-11 21:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-11 21:55 -------
The attribute used already disables the unused removal of static variables andd functions. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23344


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/23344] RFE: explicit section attribute disables the unused static const optimization
  2005-08-11 21:36 [Bug c/23344] New: RFE: explicit section attribute disables the unused static const optimization gary at intrepid dot com
  2005-08-11 21:55 ` [Bug c/23344] " pinskia at gcc dot gnu dot org
@ 2005-08-11 22:50 ` giovannibajo at libero dot it
  2005-08-11 23:16 ` gary at intrepid dot com
  2 siblings, 0 replies; 4+ messages in thread
From: giovannibajo at libero dot it @ 2005-08-11 22:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2005-08-11 22:50 -------
Yes, the concept of "used" and "put in a specific section" should be kept 
separate. I'm sure that it might be overloaded for specific variables in 
specific applications, but I can very well think of cases where static 
variables put in specific sections because of embedded system oddities become 
really unused because of preprocessor stripping of features from the code.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23344


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/23344] RFE: explicit section attribute disables the unused static const optimization
  2005-08-11 21:36 [Bug c/23344] New: RFE: explicit section attribute disables the unused static const optimization gary at intrepid dot com
  2005-08-11 21:55 ` [Bug c/23344] " pinskia at gcc dot gnu dot org
  2005-08-11 22:50 ` giovannibajo at libero dot it
@ 2005-08-11 23:16 ` gary at intrepid dot com
  2 siblings, 0 replies; 4+ messages in thread
From: gary at intrepid dot com @ 2005-08-11 23:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gary at intrepid dot com  2005-08-11 23:16 -------
Thanks for the follow-up.   Sounds reasonable to have only the 'used' 
attribute to control the (unused) static const optimization.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23344


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-08-11 23:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-11 21:36 [Bug c/23344] New: RFE: explicit section attribute disables the unused static const optimization gary at intrepid dot com
2005-08-11 21:55 ` [Bug c/23344] " pinskia at gcc dot gnu dot org
2005-08-11 22:50 ` giovannibajo at libero dot it
2005-08-11 23:16 ` gary at intrepid dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).