This is the mail archive of the gcc-patches@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: [v3] mutex linkage cleanup


Gabriel Dos Reis <gdr@integrable-solutions.net> writes:

> The introduction of unnamed namespace was partly motivated by the
> desire to restore original intent, and as a consequence dealing with
> weird restrictions on template arguments and bodies.
> 
> If the back-end (and not the front-end!) can understand that entities
> in unnamed translation units are local to their translation unit, then
> that would be an effective support of the language functionality and
> would make it more widely used.

This is

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

All that is necessary is to make the C++ front-end stop using
TREE_PUBLIC as an alias for "has internal linkage", by adding some
other bit to mean that, and then write some code to set TREE_PUBLIC
based on whether a particular object could ever be declared outside
the current translation unit.  One class of such objects are those
declared in anonymous namespaces.

If someone could do the first part, I can do the second part...


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