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


On Sun, Feb 01, 2004 at 02:47:19AM +0100, Gabriel Dos Reis wrote:
>     cxx_used_only_in_this_tu (tree_decl *decl)
>     {
>        return !TREE_PUBLIC (decl)
>            || (cxx_no_export && declared_at_unnamed_scope (decl));

I would resist this strongly.  As a language-independent flag, TREE_PUBLIC
corresponds directly to "does .global need to be emitted in the assembly".  

If C++ knows that a decl cannot be referenced outside this TU, then it
should clear TREE_PUBLIC.  Anything less is a QOI mistake.



r~


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