diff options
Diffstat (limited to 'gcc/doc/extend.texi')
-rw-r--r-- | gcc/doc/extend.texi | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 54fd54826e7..fe09b85ef0b 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -15598,6 +15598,27 @@ You must specify @option{-Wno-pmf-conversions} to use this extension. Some attributes only make sense for C++ programs. @table @code +@item abi_tag ("@var{tag}", ...) +@cindex @code{abi_tag} attribute +The @code{abi_tag} attribute can be applied to a function or class +declaration. It modifies the mangled name of the function or class to +incorporate the tag name, in order to distinguish the function or +class from an earlier version with a different ABI; perhaps the class +has changed size, or the function has a different return type that is +not encoded in the mangled name. + +The argument can be a list of strings of arbitrary length. The +strings are sorted on output, so the order of the list is +unimportant. + +A redeclaration of a function or class must not add new ABI tags, +since doing so would change the mangled name. + +The @option{-Wabi-tag} flag enables a warning about a class which does +not have all the ABI tags used by its subobjects; for users with code +that needs to coexist with an earlier ABI, using this option can help +to find all affected types that need to be tagged. + @item init_priority (@var{priority}) @cindex @code{init_priority} attribute |