public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31462]  New: Unnamed namespace and exported symbols
@ 2007-04-03 16:09 guillaume dot melquiond at ens-lyon dot fr
  2007-04-03 19:04 ` [Bug c++/31462] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: guillaume dot melquiond at ens-lyon dot fr @ 2007-04-03 16:09 UTC (permalink / raw)
  To: gcc-bugs

(NB: I'm not suggesting to change the linkage of functions in an unnamed
namespace to internal.)

Unless specified otherwise, functions in an unnamed namespace have external
linkage. Does that mean that g++ has to export the corresponding symbol? As the
function cannot be used from another translation unit, it seems to me it is a
waste of space, and perhaps of inter-procedural optimization opportunities too.

If there is a case where it matters for the symbol to be exported, please
disregard this enhancement-request (but please provide an example as it
interests me).

The reason for this request is that I recently come across a program where
forcefully removing the export of these symbols in the object files sped up
executable linking by more than 15%. So it would provide a nice gain if GCC was
not exporting the symbols.


-- 
           Summary: Unnamed namespace and exported symbols
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: guillaume dot melquiond at ens-lyon dot fr


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


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

* [Bug c++/31462] Unnamed namespace and exported symbols
  2007-04-03 16:09 [Bug c++/31462] New: Unnamed namespace and exported symbols guillaume dot melquiond at ens-lyon dot fr
@ 2007-04-03 19:04 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-03 19:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-04-03 20:03 -------
This has already been implemented for 4.2.0.  See PR 25915 which I am closing
this as a dup of.

*** This bug has been marked as a duplicate of 25915 ***


-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2007-04-03 19:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-03 16:09 [Bug c++/31462] New: Unnamed namespace and exported symbols guillaume dot melquiond at ens-lyon dot fr
2007-04-03 19:04 ` [Bug c++/31462] " pinskia at gcc dot gnu dot org

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).