[RFC] Remove auto keyword
Joseph S. Myers
joseph@codesourcery.com
Mon Jun 10 12:13:00 GMT 2013
On Sat, 8 Jun 2013, Ondrej Bilka wrote:
> Andreas reminded me that after register cleanup we could also remove
> auto keyword.
>
> I seen it used for declaring nested function prototype like try in
> stdlib/rpmatch.c
> I needed to remove this prototype for compliation.
>
> I want to ask what to do with elf_machine_rela and friends? They have
> auto and compilation fails in same way as above but I do not know what
> is best way to remove auto.
I don't think removing auto makes sense.
If auto were used on ordinary variables with automatic storage duration,
then removing it might make sense - but as far as I can see it isn't. For
nested functions, use of auto makes sense in the same way as use of
register with asm to assign a variable to a specific register - a useful
GNU extension using a storage class specifier that isn't useful *in its
standard ISO C usages*.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list