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]

oh no - not anonymous namespaces again ...



I have done some more research and I've come to a hypothesis that
internal linkage is the right solution for anonymous namespaces.

It turns out that the discussion between Jason and Martin in 1998
(see http://gcc.gnu.org/ml/gcc-patches/1998-08/msg00352.html) was
limited because of the unfamiliarity of how to implement export.

Since gcc has yet to implement export *and* it seems that to implement
export and templates, you're going to need to change the whole way
linking works anyway, the the argument - you need globals for export,
is just not relevant.

Reconsideration of the anonymoys namespace patch found in
http://gcc.gnu.org/ml/gcc-patches/1998-08/msg00291.html
is needed.

Background:
Since the "static" global symbol is deprecated, there is no way for gcc
to guarentee conflict free linking. This seems to be a significant regression
from C. static also has some limitations that are resolved by the use of
anonymous namespaces, concluding that the best solution is to ``fix''
anonymous namespaces to elimiate the possibility of linker conflicts.




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