https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121907

--- Comment #1 from Alejandro Colomar <foss+...@alejandro-colomar.es> ---
I've been having a look at the code for implementing this diagnostic, and it's
a mess due to the duality of auto.

I propose doing like with implicit int, and make it a hard error, regardless of
it being standard.

After all, most of the remaining uses of auto did exist in old code using
implicit int, but I don't expect much code doing 'auto int' in the wild (as
it's completely redundant), so we could break some of it.

This would also allow me to write a standards proposal removing auto as a
storage-class specifier.

The only case where it would make sense to use auto today is to declare nested
functions; but we should add a new keyword for them, if that turns out to be
actually used in the wild.  I'd add __automatic__ for that.

What do you think?

Reply via email to