Re: FAQ 1.12--auto keyword




In article <443a146b.410693812@xxxxxxxxxxxxxx>, rlb@xxxxxxxxxxxxxxxxxxxxxx (Richard Bos) writes:
"Bill Pursell" <bill.pursell@xxxxxxxxx> wrote:

The faq (question 1.12) states that the keyword "auto" is completely
useless.
However, it is necessary to forward declare a nested function (for
gcc...I'm not sure if this is gcc specific or a language issue.)

There is no such thing as a nested function in ISO C.

If gcc allows nested functions, that's its business. However, if it
requires "auto" to forwardly declare them, this is broken. They should
have chosen "static".

That's debatable. I think "auto" is more appropriate, since it
suggests the additional work necessary to provide the called nested
function with a link to the enclosing function's closure (using a
static chain or display or what have you) as part of its environment.
That, to me, is a more significant feature of nested functions than
their limited scope, which I imagine is what would justify yet
another application of "static".

Though to be honest I think reusing any of the existing keywords was
a bad idea; if they want to invent a new language, they should invent
a new language.

--
Michael Wojcik michael.wojcik@xxxxxxxxxxxxxx

You brung in them two expert birdwatchers ... sayin' it was to keep us from
makin' dern fools of ourselfs ... whereas it's the inherent right of all to
make dern fools of theirselfs ... it ain't a right held by you official types
alone. -- Walt Kelly
.



Relevant Pages

  • Re: FAQ 1.12--auto keyword
    ... it is necessary to forward declare a nested function (for ... gcc...I'm not sure if this is gcc specific or a language issue.) ... If gcc allows nested functions, ...
    (comp.lang.c)
  • Re: FAQ 1.12--auto keyword
    ... it is necessary to forward declare a nested function (for ... It's gcc specific. ... Nested functions are not part of the language proper. ...
    (comp.lang.c)
  • Re: FAQ 1.12--auto keyword
    ... it is necessary to forward declare a nested function (for ... gcc...I'm not sure if this is gcc specific or a language issue.) ... Standard C doesn't allow nested function definitions. ...
    (comp.lang.c)
  • Re: FAQ 1.12--auto keyword
    ... it is necessary to forward declare a nested function (for ... that was existant but previously useless. ... to invent a new one. ...
    (comp.lang.c)
  • Re: FAQ 1.12--auto keyword
    ... it is necessary to forward declare a nested function (for ... If gcc allows nested functions, ...
    (comp.lang.c)