This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: nested function doc
- From: Geoffrey Keating <geoffk at geoffk dot org>
- To: Dale Johannesen <dalej at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 31 Jan 2005 13:36:40 -0800
- Subject: Re: Patch: nested function doc
- References: <a7255b3eb289dd89fd0e7471255a1b7c@apple.com>
Dale Johannesen <dalej@apple.com> writes:
> 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.
This is OK.
> 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).