Local type inference with auto is in C2X
Michael Matz
matz@suse.de
Thu Nov 3 15:19:25 GMT 2022
Hello,
On Thu, 3 Nov 2022, Florian Weimer via Gcc wrote:
> 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?
I would argue that changing the default C mode to c23 in the year that
comes out (or even a year later) is too aggressive and early. Existing
sources are often compiled with defaults, and hence would change
semantics, which seems unattractive. New code can instead easily use
-std=c23 for a time.
E.g. c99/gnu99 (a largish deviation from gnu90) was never default and
gnu11 was made default only in 2014.
Ciao,
Michael.
More information about the Gcc
mailing list