[cfe-dev] [RFC] __attribute__((internal_linkage))

Matthijs van Duin via cfe-dev cfe-dev at lists.llvm.org
Wed Oct 21 16:08:44 PDT 2015


On 21 October 2015 at 02:28, Aaron Ballman wrote:
> I'm not aware of any GNU attributes that appertain to a namespace

Take any random libstdc++ header, after macro expansion:

namespace std __attribute__(__visibility__("default"))

Annoyingly, using GNU-style attributes is also the only portable way
of putting an attribute on a namespace: g++ only accepts C++-style
namespace attributes in that same position (before the opening brace)
while clang only accepts it using a standards-compliant standalone
declaration inside the namespace.



More information about the cfe-dev mailing list