This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: The Manual on Extentions to the C Language Family
- To: gcc at gcc dot gnu dot org
- Subject: Re: The Manual on Extentions to the C Language Family
- From: hase at mech dot usp dot ac dot jp (Hideaki Hase)
- Date: Thu, 4 Jan 2001 22:54:33 +0900
fjh@cs.mu.oz.au said>
> On 03-Jan-2001, Hideaki Hase <hase@mech.usp.ac.jp> wrote:
> > In the 9th par. in "Nested Functions,"
> > a nested function always has NO linkage, rather than internal one,
> > doesn't it? An auto objects must have no linkage.
>
> Yes.
>
> However, it's not quite the same as the ordinary case of "no linkage",
> since forward declarations are allowed. It's more like the case of
> struct tags, for which there is a special exception:
> ...
I see. You mean there isn't it for identifiers in object name space
in std C.
> BTW, GNU C seems to allow nested functions to be declared `static', e.g.
>
> typedef void (*funcptr)(void);
> funcptr outer() {
> static void inner2();
> static void inner1() {
> inner2();
> }
> static void inner2() {
> /* ... */
> }
> inner1();
> return inner2;
> }
It says inner2 can be called after outer is over, doesn't it?
Thanks for your interesting information.
---
Hideaki HASE
School of Mechanical Systems Engineering,
The University of Shiga Prefecture, 522-8533 JAPAN
2500 Hassaka-cho, Hikone-shi, Shiga
Phone: +81-749-28-8394 E-mail: hase@mech.usp.ac.jp