On Thu, Sep 1, 2022 at 11:18 PM Jeff Law via Gcc-patches <[email protected]> wrote: > > > > On 9/1/2022 1:12 PM, Joseph Myers wrote: > > C2x has completely removed unprototyped functions, so that () now > > means the same as (void) in both function declarations and > > definitions, where previously that change had been made for > > definitions only. Implement this accordingly. > > > > This is a change where GNU/Linux distribution builders might wish to > > try builds with a -std=gnu2x default to start early on getting old > > code fixed that still has () declarations for functions taking > > arguments, in advance of GCC moving to -std=gnu2x as default maybe in > > GCC 14 or 15; I don't know how much such code is likely to be in > > current use. > Happy to see this happen (dropping unprototyped funtions). IIRC older > versions of autoconf are going to generate code that runs afoul of this > problem as well.
To catch these cases with a diagnostic earlier is -Wstrict-prototypes -Wold-style-declaration enough to diagnose all cases that the new standard will reject? I suppose -W*-c2x-compat are not the correct vehicle to diagnose these? Thanks, Richard. > > jeff >
