]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c-tree.texi (Functions): Remove DECL_REAL_CONTEXT documentation; add DECL_FRIEND_CONTEXT.
authorMark Mitchell <mark@codesourcery.com>
Fri, 11 Apr 2003 18:36:25 +0000 (18:36 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Fri, 11 Apr 2003 18:36:25 +0000 (18:36 +0000)
* doc/c-tree.texi (Functions): Remove DECL_REAL_CONTEXT
documentation; add DECL_FRIEND_CONTEXT.

From-SVN: r65472

gcc/ChangeLog
gcc/doc/c-tree.texi

index 35c7a34b8b0d879fdff33cb72c3d47d4a1ba42d9..9a558be16954364ce18b5c4826630e32049bbbaf 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-11  Mark Mitchell  <mark@codesourcery.com>
+
+       * doc/c-tree.texi (Functions): Remove DECL_REAL_CONTEXT
+       documentation; add DECL_FRIEND_CONTEXT.
+
 2003-04-11  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        * doc/install.texi (hppa): Update links for HP-UX patches.  Revise
index fbc90fa34f2fc2ff86c4e53d7df014af433faaba..ff5a5fa54b6c39de258557aa49e2146fe157660c 100644 (file)
@@ -1021,34 +1021,35 @@ will always return the function itself, and @code{OVL_NEXT} will always
 be @code{NULL_TREE}.
 
 To determine the scope of a function, you can use the
-@code{DECL_REAL_CONTEXT} macro.  This macro will return the class
+@code{DECL_CONTEXT} macro.  This macro will return the class
 (either a @code{RECORD_TYPE} or a @code{UNION_TYPE}) or namespace (a
 @code{NAMESPACE_DECL}) of which the function is a member.  For a virtual
 function, this macro returns the class in which the function was
 actually defined, not the base class in which the virtual declaration
-occurred.  If a friend function is defined in a class scope, the
-@code{DECL_CLASS_CONTEXT} macro can be used to determine the class in
+occurred.  
+
+If a friend function is defined in a class scope, the
+@code{DECL_FRIEND_CONTEXT} macro can be used to determine the class in
 which it was defined.  For example, in
 @example
 class C @{ friend void f() @{@} @};
 @end example
-the @code{DECL_REAL_CONTEXT} for @code{f} will be the
-@code{global_namespace}, but the @code{DECL_CLASS_CONTEXT} will be the
+@noindent
+the @code{DECL_CONTEXT} for @code{f} will be the
+@code{global_namespace}, but the @code{DECL_FRIEND_CONTEXT} will be the
 @code{RECORD_TYPE} for @code{C}.
 
-The @code{DECL_REAL_CONTEXT} and @code{DECL_CLASS_CONTEXT} are not
-available in C; instead you should simply use @code{DECL_CONTEXT}.  In C,
-the @code{DECL_CONTEXT} for a function maybe another function.  This
-representation indicates that the GNU nested function extension is in
-use.  For details on the semantics of nested functions, see the GCC
-Manual.  The nested function can refer to local variables in its
+In C, the @code{DECL_CONTEXT} for a function maybe another function.
+This representation indicates that the GNU nested function extension
+is in use.  For details on the semantics of nested functions, see the
+GCC Manual.  The nested function can refer to local variables in its
 containing function.  Such references are not explicitly marked in the
 tree structure; back ends must look at the @code{DECL_CONTEXT} for the
 referenced @code{VAR_DECL}.  If the @code{DECL_CONTEXT} for the
 referenced @code{VAR_DECL} is not the same as the function currently
-being processed, and neither @code{DECL_EXTERNAL} nor @code{DECL_STATIC}
-hold, then the reference is to a local variable in a containing
-function, and the back end must take appropriate action.
+being processed, and neither @code{DECL_EXTERNAL} nor
+@code{DECL_STATIC} hold, then the reference is to a local variable in
+a containing function, and the back end must take appropriate action.
 
 @menu
 * Function Basics::     Function names, linkage, and so forth.