[Bug libstdc++/66902] _S_debug_messages is unneccessary public

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Sep 11 10:38:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66902

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
3.5 [basic.link]:

-3-  A name having namespace scope (3.3.6) has internal linkage if it is the
     name of
      — a variable, function or function template that is explicitly declared
        static; or,
      — a variable of non-volatile const-qualified type that is neither
        explicitly declared extern nor previously declared to have external
        linkage; or
      — a data member of an anonymous union.

The first bullet applied when it was explicitly declared static and the second
bullet applies now that it is a const-qualified type at namespace scope. In
both cases it has internal linkage, so you should not see a global symbol and
should not get the warning.


More information about the Gcc-bugs mailing list