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


Jan Hubicka <hubicka@ucw.cz> writes:

| > 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.
| 
| Hi,
| I am having related problem with unit-at-a-time.  With -fwhole program I
| need to make functions that are public in C/C++ static for the backend.
| I am having prototype patch, but still I am holding because I am unsure
| whether clearing up TREE_PUBLIC in cgraph_optimize is TRT.
| Given that we want to declare TREE_PUBLIC to be in backend's semantic
| and make frontends to use different flag when these don't match (that is
| with -fwhole-program almost always),  I think I can update the patch and
| propose it for mainline once I am done with merging the tree-SSA cgraph
| code back.

I'll hold on your patch then.

-- Gaby


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