Local type inference with auto is in C2X
Joseph Myers
joseph@codesourcery.com
Thu Nov 3 18:04:31 GMT 2022
On Thu, 3 Nov 2022, Florian Weimer via Gcc wrote:
> My main worry is that both Clang and GCC still enable implicit ints by
> default. This means that auto variables have type int always, and that
> can subtly alter the meaning of programs. The only indication that this
> has happened in a code base is a warning that went away (!). I don't
> like that.
My expectation is that the old use of auto as a storage class specifier is
actually very rare in C code, so this particular sub-case (auto with no
type specifier meaning implicit int) is even rarer and there isn't much
porting to be done for it (unlike for the rest of implicit int).
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc
mailing list