Message ID | dccebe11-12a5-6d58-e61c-ffebf2cfeb87@gmail.com |
---|---|
State | New |
Headers | show |
Series | [doc] mention interaction with noinline in flatten | expand |
On 10/11/18 2:58 PM, Martin Sebor wrote: > While writing tests for attribute flatten I wasn't 100% sure > from reading the manual if it would respect attribute noinline > or if it would override it. Turns out it's the former so > the attached patch mentions it in the manual. Unless there > are objections I will commit the change tomorrow. > > Martin > > gcc-attr-flatten.diff > > gcc/ChangeLog: > > * doc/extend.texi (attribute flatten): Mention interaction with > noinline. OK. jeff
On 10/11/2018 02:58 PM, Martin Sebor wrote: > While writing tests for attribute flatten I wasn't 100% sure > from reading the manual if it would respect attribute noinline > or if it would override it. Turns out it's the former so > the attached patch mentions it in the manual. Unless there > are objections I will commit the change tomorrow. I've been behind on doc patch review, but for the record, this is fine with me. -Sandra
gcc/ChangeLog: * doc/extend.texi (attribute flatten): Mention interaction with noinline. diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 0d9b99f..d6f4630 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -2615,8 +2615,9 @@ explicit @code{externally_visible} attributes are still necessary. @cindex @code{flatten} function attribute Generally, inlining into a function is limited. For a function marked with this attribute, every call inside this function is inlined, if possible. -Whether the function itself is considered for inlining depends on its size and -the current inlining parameters. +Functions declared with attribute @code{noinline} and similar are not +inlined. Whether the function itself is considered for inlining depends +on its size and the current inlining parameters. @item format (@var{archetype}, @var{string-index}, @var{first-to-check}) @cindex @code{format} function attribute