]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
extend.texi (Function Attributes): Mention asm ("") as method to keep calls.
authorHans-Peter Nilsson <hp@axis.com>
Fri, 8 Feb 2008 02:43:52 +0000 (02:43 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Fri, 8 Feb 2008 02:43:52 +0000 (02:43 +0000)
* doc/extend.texi (Function Attributes) <noinline>: Mention
asm ("") as method to keep calls.

From-SVN: r132182

gcc/ChangeLog
gcc/doc/extend.texi

index 3b8e28f3708826f6530d2feff7d3e62847613bc6..c60e891b1264349208964eeb4f9f3c84b47dfd3d 100644 (file)
@@ -1,3 +1,8 @@
+2008-02-08  Hans-Peter Nilsson  <hp@axis.com>
+
+       * doc/extend.texi (Function Attributes) <noinline>: Mention
+       asm ("") as method to keep calls.
+
 2008-02-07  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
 
        PR other/32754
index 7711e1f740625e7e42caae251a7ea809642a738d..b29e5b254467f72e2e384a584da4912f76fd8c5e 100644 (file)
@@ -2519,6 +2519,17 @@ Functions with this attribute will not be so instrumented.
 @cindex @code{noinline} function attribute
 This function attribute prevents a function from being considered for
 inlining.
+@c Don't enumerate the optimizations by name here; we try to be
+@c future-compatible with this mechanism.
+If the function does not have side-effects, there are optimizations
+other than inlining that causes function calls to be optimized away,
+although the function call is live.  To keep such calls from being
+optimized away, put
+@smallexample
+asm ("");
+@end smallexample
+(@pxref{Extended Asm}) in the called function, to serve as a special
+side-effect.
 
 @item nonnull (@var{arg-index}, @dots{})
 @cindex @code{nonnull} function attribute