More C type errors by default for GCC 14

Eli Zaretskii eliz@gnu.org
Wed May 10 15:30:40 GMT 2023


> Date: Wed, 10 May 2023 16:22:26 +0200
> From: Jakub Jelinek <jakub@redhat.com>
> Cc: Gabriel Ravier <gabravier@gmail.com>, jwakely.gcc@gmail.com,
>         fweimer@redhat.com, gcc@gcc.gnu.org, arsen@aarsen.me
> 
> > > Are you seriously saying that no accepts-invalid bug should ever be 
> > > fixed under any circumstances on the basis that some programmers might 
> > > rely on code exploiting that bug ??
> > 
> > Sorry, I'm afraid I don't understand the question.  What are
> > "accepts-invalid bugs"?
> 
> They are bugs where compiler accepts something that isn't valid in
> the selected language nor considered valid extension.
> So, after the fix we reject something that has been accepted before.

If some program is plainly invalid, not just because the criteria of
validity have shifted, then yes, such a program should be rejected.

> What we are talking in this thread is also something not valid in C99 or
> later, for the int-conversion stuff not even valid in C89, in the past
> accepted just for K&R legacy reasons.

Yes, and that's the crucial (for me) difference: what is currently
considered invalid was valid in the past, and so there's a set of
rules under which that kind of program can produce valid machine code.


More information about the Gcc mailing list