Anonymous Namespaces
Richard Henderson
rth@redhat.com
Sun Feb 1 05:38:00 GMT 2004
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~
More information about the Gcc
mailing list