Re: [PATCH 3/5] Fortran: Narrow return types [PR78798]

2022-11-13 Thread Bernhard Reutner-Fischer via Gcc-patches
On 13 November 2022 21:29:50 CET, Harald Anlauf wrote: >Replacing "int" by "signed char" adds confusion and makes code >less understandable, so I would oppose it, as we don't solve a >real problem and rather add confusion. Ok so consider the non-bool hunks dropped, they just fell out of my

Re: [PATCH 3/5] Fortran: Narrow return types [PR78798]

2022-11-13 Thread Harald Anlauf via Gcc-patches
Am 13.11.22 um 11:39 schrieb Bernhard Reutner-Fischer via Gcc-patches: On Sun, 13 Nov 2022 12:13:26 +0200 Janne Blomqvist wrote: On Sun, Nov 13, 2022 at 1:47 AM Bernhard Reutner-Fischer via Fortran wrote: --- a/gcc/fortran/arith.cc +++ b/gcc/fortran/arith.cc @@ -1135,7 +1135,7 @@

Re: [PATCH 3/5] Fortran: Narrow return types [PR78798]

2022-11-13 Thread Bernhard Reutner-Fischer via Gcc-patches
On Sun, 13 Nov 2022 12:13:26 +0200 Janne Blomqvist wrote: > On Sun, Nov 13, 2022 at 1:47 AM Bernhard Reutner-Fischer via Fortran > wrote: > > --- a/gcc/fortran/arith.cc > > +++ b/gcc/fortran/arith.cc > > @@ -1135,7 +1135,7 @@ compare_complex (gfc_expr *op1, gfc_expr *op2) > > strings. We

Re: [PATCH 3/5] Fortran: Narrow return types [PR78798]

2022-11-13 Thread Janne Blomqvist via Gcc-patches
On Sun, Nov 13, 2022 at 1:47 AM Bernhard Reutner-Fischer via Fortran wrote: > --- a/gcc/fortran/arith.cc > +++ b/gcc/fortran/arith.cc > @@ -1135,7 +1135,7 @@ compare_complex (gfc_expr *op1, gfc_expr *op2) > strings. We return -1 for a < b, 0 for a == b and 1 for a > b. > We use the

[PATCH 3/5] Fortran: Narrow return types [PR78798]

2022-11-12 Thread Bernhard Reutner-Fischer via Gcc-patches
gcc/fortran/ChangeLog: * arith.cc (compare_complex): Use narrower return type. (gfc_compare_string): Likewise. * arith.h (gfc_compare_string): Same. (gfc_compare_with_Cstring): Ditto. * array.cc (compare_bounds): Ditto. (gfc_compare_array_spec):