This is the mail archive of the 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]

abi_tag questions

I have two questions regarding the abi_tag attribute (as documented at <>):

1 "The attribute can also be applied to an inline namespace, but does not affect the mangled name of the namespace; in this case it is only used for -Wabi-tag warnings and automatic tagging of functions and variables."

I would naively assume that the "automatic tagging" part means that with

inline namespace n __attribute__((__abi_tag__("t"))) { void f() {} }

n::f would be tagged, but that appears not to be the case?

2  "The argument can be a list of strings of arbitrary length."

Does that mean the list can be empty?

void f() __attribute__((__abi_tag__()));

fails with "error: wrong number of arguments specified for â__abi_tag__â attribute" while

inline namespace n __attribute__((__abi_tag__())) {}

is accepted by recent trunk GCC (as well as older versions).

(I stumbled across the latter on Fedora 23, where libstdc++'s <> "Fix abi_tag in special modes" is not yet fixed, so it contains such an empty abi_tag on an inline namespace, and Clang with patch <> "add gcc abi_tag support" produces an error.)

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