[C++0x PATCH] Remove auto as a storage class specifier

Gabriel Dos Reis gdr@integrable-solutions.net
Fri Feb 29 22:47:00 GMT 2008


On Thu, Feb 28, 2008 at 4:20 PM, Doug Gregor <doug.gregor@gmail.com> wrote:
>
> On Thu, Feb 28, 2008 at 1:52 PM, Andrew Pinski <pinskia@gmail.com> wrote:
>  > On Thu, Feb 28, 2008 at 1:47 PM, Doug Gregor <doug.gregor@gmail.com> wrote:
>  >  > This little patch removes "auto" as a storage class specifier in
>  >  >  C++0x, per N2546. The scheme is simple: warn in C++98 mode that the
>  >  >  old meaning of "auto" is going away (but only if -Wc++0x-compat), and
>  >  >  error in C++0x mode because we don't yet support the new meaning of
>  >  >  "auto". Think of this as "paving the way" to the new "auto".
>  >  >
>  >  >  Okay for mainline, as soon as the C++ committee votes this into the
>  >  >  working paper on Saturday?
>  >
>  >  So why are they making C and C++ more incompatible?  That seems wrong
>  >  but what ever.
>
>  Rationale is here:
>
>   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2337.pdf
>
>  Basically, the use of "auto" as a storage specifier is pretty rare,
>  and conflicts with the new meaning of "auto" in C++0x.
>
>  I guess at some point we'll want -Wc++-compat in the C front end to
>  warn about this, but probably not until C++0x is the C++ standard.
>
>   - Doug
>

agreed.



More information about the Gcc-patches mailing list