Re: More C type errors by default for GCC 14
Neal Gompa <[email protected]> Wed, 10 May 2023 08:10:48 -0400
| Newsgroups | dev.linux.lists.c-std-porting |
|---|---|
| Message-ID | <CAEg-Je9A08=7hs6OmN3u-oVr0BHAVJ--c7y=D-5TMeZGF7v4kg@mail.gmail.com> |
On Wed, May 10, 2023 at 8:05=E2=80=AFAM Eli Zaretskii <[email protected]> wrote: > > > From: Neal Gompa <[email protected]> > > Date: Wed, 10 May 2023 06:56:32 -0400 > > Cc: Eric Gallager <[email protected]>, Jonathan Wakely <jwakely.gcc@= gmail.com>, [email protected], > > David Edelsohn <[email protected]>, Eli Zaretskii <[email protected]>,= Jakub Jelinek <[email protected]>, > > Arsen Arsenovi=C4=87 <[email protected]>, [email protected], > > [email protected] > > > > On Wed, May 10, 2023 at 6:48=E2=80=AFAM Sam James <[email protected]> wrot= e: > > > > > > Neal Gompa wasn't keen on the idea at > > > https://lore.kernel.org/c-std-porting/CAEg-Je8=3DdQo-jAdu=3DOd5DH+h9A= [email protected]/ > > > because it'd feel like essentially "repeated punches". > > > > > > Maybe it'd work with some tweaks: I would, however, be more open to G= CC 14 having > > > implicit-function-declaration,implicit-int (these are so closely rela= ted > > > that it's not worth dividing the two up) and then say, GCC 15 having = int-conversion and maybe > > > incompatible-pointer-types. But spreading it out too much is likely c= ounterproductive. > > > > Right, we've been going through a similar effort with C++ over the > > past decade. GCC incrementally becoming more strict on C++ has been an > > incredibly painful experience, and it eats away a ton of time that I > > would have spent dealing with other problems. Having one big event > > where the majority of changes to make the C compiler strict happen > > will honestly make it less painful, even if it doesn't seem like it at > > the moment. > > But not having such an event, ever, would be even less painful. That's not going to happen. An event will eventually happen when GCC and Clang switch their default C standard version. And making the compilers stricter is something that has enough benefit to outweigh the pain. The question is "how often" rather than "should we do it". -- =E7=9C=9F=E5=AE=9F=E3=81=AF=E3=81=84=E3=81=A4=E3=82=82=E4=B8=80=E3=81=A4=EF= =BC=81/ Always, there's only one truth!