This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Anonymous Namespaces


Kevin Atkinson <kevina@gnu.org> writes:

| On 31 Jan 2004, Gabriel Dos Reis wrote:
| 
| > Kevin Atkinson <kevina@gnu.org> writes:
| > 
| > |  There is no way for the symbol defined in
| > | an anonymous namespace to be used outside if the translation unit. It
| > | should have the same effect as static.  The new unit-at-a-time optimizations 
| > | will be a lot more beneficial in C++ programs is anonymous namespaces were 
| > | treated that way.
| > 
| > If you're having trouble with unit-at-a-time not recognizing functions
| > in unnamed namespacen, then the right course of action to do is to teach
| > that programmed inliner to recognize those functions.  Asking for
| > deviating from standard semantics is wrong.
| 
| What that is what I am REALLY asking for.  How difficult would that be?

I don't know.  But I guess it would not be difficult; typically you
test whether any or the intervening namespace in the qualifying scope
is unnamed.  Unnamed namespaces have their DECL_NAME null.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]