So apparently auto was voted in to the committee draft of C2X at the
last minute.  I wonder how this aligns with the WG14 charter, given the
lack of implementation experience with this feature, but it looks like
we are now stuck with it.

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 original plan was to port upstreams & distributions away from
implicit ints (again, configure scripts are problematic), and then have
at least one GCC release that disables implicit ints in the default
language mode.  But I'm not sure if that's now possible: the porting
will not have propagated widely once GCC 13 releases, so rejecting
implicit ints in GCC 13 might be too early.  GCC 14 might want to switch
to C23/C24 mode by default, activating auto support, if the standard
comes out in 2023 (which apparently is the plan).  Then we would go from
warning to changed semantics in a single release.

Comments?

Thanks,
Florian

Reply via email to