Anonymous Namespaces

Kevin Atkinson kevina@gnu.org
Sun Feb 1 03:17:00 GMT 2004


On 31 Jan 2004, Geoff Keating wrote:

> This is discussed in
> <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10591>
> 
> The answers to the question you really meant to ask is "no, there is
> no reason to make a function in an anonymous namespace visible outside
> the current .o file, or for that matter any object that can't be declared
> without using a name that refers to the anonymous namespace."

OK well I, as a C++ programmer, would REALLY like for functions declared 
inside an anonymous namespace to get the same treatment as static 
functions by the new unit-at-a-time optimizer.  If possible I would 
like to see this get into Gcc 3.4.  However, if that is not possible I 
would like to see it in Gcc 3.4.1.  I would hate to have to wait until Gcc 
3.5 (or latter).

I know nothing of how GCC internals work but I believe Gabriel Dos Reis 
and Chris Lattner have between them found a solution to the problem.

The issue discussed in the bug report mentioned is similar but it makes no 
mention of the new unit-at-a-time optimizer.

-- 
http://kevin.atkinson.dhs.org



More information about the Gcc mailing list