This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: nested function doc
- From: Dale Johannesen <dalej at apple dot com>
- To: gcc-patches Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Dale Johannesen <dalej at apple dot com>
- Date: Sun, 30 Jan 2005 18:34:06 -0800
- Subject: Patch: nested function doc
While dealing with an unhappy user Geoff and I noticed the
documentation for inline
functions was wrong; they do not have internal linkage. Also clarifies
that "static"
is not allowed. Bootstrapped and 'info' eyeballed. OK?
2005-01-30 Dale Johannesen <dalej@apple.com>
* doc/extend.texi (nested functions): Fix linkage description.
Clarify that static is not allowed.
Index: extend.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/extend.texi,v
retrieving revision 1.235
diff -u -d -b -w -p -r1.235 extend.texi
--- extend.texi 3 Dec 2004 17:37:09 -0000 1.235
+++ extend.texi 31 Jan 2005 02:26:45 -0000
@@ -449,8 +449,8 @@ bar (int *array, int offset, int size)
@end group
@end smallexample
-A nested function always has internal linkage. Declaring one with
-@code{extern} is erroneous. If you need to declare the nested function
+A nested function always has no linkage. Declaring one with
+@code{extern} or @code{static} is erroneous. If you need to declare
the nested function
before its definition, use @code{auto} (which is otherwise meaningless
for function declarations).