Message ID | 20230321083322.663561-3-clg@kaod.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fixes for GCC13 | expand |
On 21/3/23 09:33, Cédric Le Goater wrote: > From: Cédric Le Goater <clg@redhat.com> > > GCC13 reports an error : > > ../target/s390x/tcg/fpu_helper.c:123:5: error: conflicting types for ‘float_comp_to_cc’ due to enum/integer mismatch; have ‘int(CPUS390XState *, FloatRelation)’ {aka ‘int(struct CPUArchState *, FloatRelation)’} [-Werror=enum-int-mismatch] > > 123 | int float_comp_to_cc(CPUS390XState *env, FloatRelation float_compare) > | ^~~~~~~~~~~~~~~~ > In file included from ../target/s390x/tcg/fpu_helper.c:23: > ../target/s390x/s390x-internal.h:302:5: note: previous declaration of ‘float_comp_to_cc’ with type ‘int(CPUS390XState *, int)’ {aka ‘int(struct CPUArchState *, int)’} > 302 | int float_comp_to_cc(CPUS390XState *env, int float_compare); > | ^~~~~~~~~~~~~~~~ > > Cc: Thomas Huth <thuth@redhat.com> > Cc: Richard Henderson <richard.henderson@linaro.org> > Cc: David Hildenbrand <david@redhat.com> > Cc: Ilya Leoshkevich <iii@linux.ibm.com> > Fixes: 71bfd65c5f ("softfloat: Name compare relation enum") > Signed-off-by: Cédric Le Goater <clg@redhat.com> > --- > target/s390x/s390x-internal.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
On 3/21/23 01:33, Cédric Le Goater wrote: > From: Cédric Le Goater<clg@redhat.com> > > GCC13 reports an error : > > ../target/s390x/tcg/fpu_helper.c:123:5: error: conflicting types for ‘float_comp_to_cc’ due to enum/integer mismatch; have ‘int(CPUS390XState *, FloatRelation)’ {aka ‘int(struct CPUArchState *, FloatRelation)’} [-Werror=enum-int-mismatch] > > 123 | int float_comp_to_cc(CPUS390XState *env, FloatRelation float_compare) > | ^~~~~~~~~~~~~~~~ > In file included from ../target/s390x/tcg/fpu_helper.c:23: > ../target/s390x/s390x-internal.h:302:5: note: previous declaration of ‘float_comp_to_cc’ with type ‘int(CPUS390XState *, int)’ {aka ‘int(struct CPUArchState *, int)’} > 302 | int float_comp_to_cc(CPUS390XState *env, int float_compare); > | ^~~~~~~~~~~~~~~~ > > Cc: Thomas Huth<thuth@redhat.com> > Cc: Richard Henderson<richard.henderson@linaro.org> > Cc: David Hildenbrand<david@redhat.com> > Cc: Ilya Leoshkevich<iii@linux.ibm.com> > Fixes: 71bfd65c5f ("softfloat: Name compare relation enum") > Signed-off-by: Cédric Le Goater<clg@redhat.com> > --- > target/s390x/s390x-internal.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
On 21/03/2023 09.33, Cédric Le Goater wrote: > From: Cédric Le Goater <clg@redhat.com> > > GCC13 reports an error : > > ../target/s390x/tcg/fpu_helper.c:123:5: error: conflicting types for ‘float_comp_to_cc’ due to enum/integer mismatch; have ‘int(CPUS390XState *, FloatRelation)’ {aka ‘int(struct CPUArchState *, FloatRelation)’} [-Werror=enum-int-mismatch] > > 123 | int float_comp_to_cc(CPUS390XState *env, FloatRelation float_compare) > | ^~~~~~~~~~~~~~~~ > In file included from ../target/s390x/tcg/fpu_helper.c:23: > ../target/s390x/s390x-internal.h:302:5: note: previous declaration of ‘float_comp_to_cc’ with type ‘int(CPUS390XState *, int)’ {aka ‘int(struct CPUArchState *, int)’} > 302 | int float_comp_to_cc(CPUS390XState *env, int float_compare); > | ^~~~~~~~~~~~~~~~ > > Cc: Thomas Huth <thuth@redhat.com> > Cc: Richard Henderson <richard.henderson@linaro.org> > Cc: David Hildenbrand <david@redhat.com> > Cc: Ilya Leoshkevich <iii@linux.ibm.com> > Fixes: 71bfd65c5f ("softfloat: Name compare relation enum") > Signed-off-by: Cédric Le Goater <clg@redhat.com> > --- > target/s390x/s390x-internal.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h > index 5d4361d35b..825252d728 100644 > --- a/target/s390x/s390x-internal.h > +++ b/target/s390x/s390x-internal.h > @@ -11,6 +11,7 @@ > #define S390X_INTERNAL_H > > #include "cpu.h" > +#include "fpu/softfloat.h" > > #ifndef CONFIG_USER_ONLY > typedef struct LowCore { > @@ -299,7 +300,7 @@ uint32_t set_cc_nz_f128(float128 v); > uint8_t s390_softfloat_exc_to_ieee(unsigned int exc); > int s390_swap_bfp_rounding_mode(CPUS390XState *env, int m3); > void s390_restore_bfp_rounding_mode(CPUS390XState *env, int old_mode); > -int float_comp_to_cc(CPUS390XState *env, int float_compare); > +int float_comp_to_cc(CPUS390XState *env, FloatRelation float_compare); > > #define DCMASK_ZERO 0x0c00 > #define DCMASK_NORMAL 0x0300 Reviewed-by: Thomas Huth <thuth@redhat.com>
diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h index 5d4361d35b..825252d728 100644 --- a/target/s390x/s390x-internal.h +++ b/target/s390x/s390x-internal.h @@ -11,6 +11,7 @@ #define S390X_INTERNAL_H #include "cpu.h" +#include "fpu/softfloat.h" #ifndef CONFIG_USER_ONLY typedef struct LowCore { @@ -299,7 +300,7 @@ uint32_t set_cc_nz_f128(float128 v); uint8_t s390_softfloat_exc_to_ieee(unsigned int exc); int s390_swap_bfp_rounding_mode(CPUS390XState *env, int m3); void s390_restore_bfp_rounding_mode(CPUS390XState *env, int old_mode); -int float_comp_to_cc(CPUS390XState *env, int float_compare); +int float_comp_to_cc(CPUS390XState *env, FloatRelation float_compare); #define DCMASK_ZERO 0x0c00 #define DCMASK_NORMAL 0x0300