From 85456819d36f630d4a93a036280fae3d21e008a7 Mon Sep 17 00:00:00 2001 From: echristo Date: Mon, 10 Jun 2002 19:12:10 +0000 Subject: [PATCH] 2002-06-10 Eric Christopher * doc/extend.texi (Return Address): Add note explaining the side- effects of inlining on __builtin_return_address. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54449 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/doc/extend.texi | 15 +++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3c4c61dfbe9..96c940228c5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-06-10 Eric Christopher + + * doc/extend.texi (Return Address): Add note explaining the side- + effects of inlining on __builtin_return_address. + 2002-06-10 Tom Tromey * Makefile.in (LANGHOOKS_DEF_H): Include langhooks-def.h. diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 34d8ba9d092..76aa5408065 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -4294,7 +4294,10 @@ This function returns the return address of the current function, or of one of its callers. The @var{level} argument is number of frames to scan up the call stack. A value of @code{0} yields the return address of the current function, a value of @code{1} yields the return address -of the caller of the current function, and so forth. +of the caller of the current function, and so forth. When inlining +the expected behavior is that the function will return the address of +the function that will be returned to. To work around this behavior use +the @code{noinline} function attribute. The @var{level} argument must be a constant integer. @@ -4765,7 +4768,7 @@ instructions, but allow the compiler to schedule those calls. These built-in functions are available for the Alpha family of processors, depending on the command-line switches used. -The following built-in functions are always available. They +The following built-in functions are always available. They all generate the machine instruction that is part of the name. @example @@ -6175,7 +6178,7 @@ subsequent functions. The RS/6000 and PowerPC targets define one pragma for controlling whether or not the @code{longcall} attribute is added to function declarations by default. This pragma overrides the @option{-mlongcall} -option, but not the @code{longcall} and @code{shortcall} attributes. +option, but not the @code{longcall} and @code{shortcall} attributes. @xref{RS/6000 and PowerPC Options}, for more information about when long calls are and are not necessary. @@ -6258,7 +6261,7 @@ is supported. This pragma renames all subsequent function and variable declarations such that @var{string} is prepended to the name. This effect may be -terminated by using another @code{extern_prefix} pragma with the +terminated by using another @code{extern_prefix} pragma with the empty string. This pragma is similar in intent to to the asm labels extension @@ -6450,7 +6453,7 @@ one thread. New text after paragraph 7 @quotation -It is unspecified whether additional action must be taken to +It is unspecified whether additional action must be taken to ensure when and whether side effects are visible to other threads. @end quotation @@ -6466,7 +6469,7 @@ Add after paragraph 5 @quotation The thread that begins execution at the @code{main} function is called -the @dfn{main thread}. It is implementation defined how functions +the @dfn{main thread}. It is implementation defined how functions beginning threads other than the main thread are designated or typed. A function so designated, as well as the @code{main} function, is called a @dfn{thread startup function}. It is implementation defined what -- 2.11.4.GIT