This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC] Remove auto keyword
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Ondrej Bilka <neleai at seznam dot cz>
- Cc: <libc-alpha at sourceware dot org>
- Date: Mon, 10 Jun 2013 12:13:15 +0000
- Subject: Re: [RFC] Remove auto keyword
- References: <20130608213516 dot GA14655 at domone>
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