Re: [PATCH][RFC] middle-end/106811 - document GENERIC/GIMPLE undefined behavior

2023-09-20 Thread Richard Sandiford
Richard Biener writes: > On Wed, 20 Sep 2023, Richard Sandiford wrote: > >> Thanks for doing this. Question below... >> >> Richard Biener via Gcc-patches writes: >> > The following attempts to provide a set of conditions GENERIC/GIMPLE >> > considers invoking undefined behavior, leaning on the

Re: [PATCH][RFC] middle-end/106811 - document GENERIC/GIMPLE undefined behavior

2023-09-20 Thread Alexander Monakov
On Fri, 15 Sep 2023, Richard Biener via Gcc-patches wrote: > +@itemize @bullet > +@item > +When the result of negation, addition, subtraction or division of two signed > +integers or signed integer vectors not subject to @option{-fwrapv} cannot be > +represented in the type. It would be a bit

Re: [PATCH][RFC] middle-end/106811 - document GENERIC/GIMPLE undefined behavior

2023-09-20 Thread Richard Biener
On Wed, 20 Sep 2023, Richard Sandiford wrote: > Thanks for doing this. Question below... > > Richard Biener via Gcc-patches writes: > > The following attempts to provide a set of conditions GENERIC/GIMPLE > > considers invoking undefined behavior, leaning on the C standards > > Annex J, as to

Re: [PATCH][RFC] middle-end/106811 - document GENERIC/GIMPLE undefined behavior

2023-09-20 Thread Richard Sandiford
Thanks for doing this. Question below... Richard Biener via Gcc-patches writes: > The following attempts to provide a set of conditions GENERIC/GIMPLE > considers invoking undefined behavior, leaning on the C standards > Annex J, as to provide portability guidance to language frontend >

[PATCH][RFC] middle-end/106811 - document GENERIC/GIMPLE undefined behavior

2023-09-15 Thread Richard Biener via Gcc-patches
The following attempts to provide a set of conditions GENERIC/GIMPLE considers invoking undefined behavior, leaning on the C standards Annex J, as to provide portability guidance to language frontend developers. I've both tried to remember cases we exploit undefined behavior and went over C2x