> Date: Wed, 10 May 2023 16:22:26 +0200
> From: Jakub Jelinek <ja...@redhat.com>
> Cc: Gabriel Ravier <gabrav...@gmail.com>, jwakely....@gmail.com,
>         fwei...@redhat.com, gcc@gcc.gnu.org, ar...@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.

Reply via email to