Re: [PATCH 1/3] softfloat: Fix declaration of partsN_compare

2022-04-01 Thread Richard Henderson
On 4/1/22 12:12, Peter Maydell wrote: The types are compatible, but it's weird that the compiler doesn't warn that the prototype and definition are different types: it seems like the kind of "technically valid but usually a bug" that a warning would be nice for. Good point. Submitted https://g

Re: [PATCH 1/3] softfloat: Fix declaration of partsN_compare

2022-04-01 Thread Peter Maydell
On Fri, 1 Apr 2022 at 19:08, Richard Henderson wrote: > > On 4/1/22 07:22, Richard Henderson wrote: > > The declaration used 'int', while the definition used 'FloatRelation'. > > This should have resulted in a compiler error, but mysteriously didn't. > > Bah, of course there's no error -- this is

Re: [PATCH 1/3] softfloat: Fix declaration of partsN_compare

2022-04-01 Thread Richard Henderson
On 4/1/22 07:22, Richard Henderson wrote: The declaration used 'int', while the definition used 'FloatRelation'. This should have resulted in a compiler error, but mysteriously didn't. Bah, of course there's no error -- this is C not C++. The enumeration has values -1 ... 2, which means that t

Re: [PATCH 1/3] softfloat: Fix declaration of partsN_compare

2022-04-01 Thread Peter Maydell
On Fri, 1 Apr 2022 at 14:22, Richard Henderson wrote: > > The declaration used 'int', while the definition used 'FloatRelation'. > This should have resulted in a compiler error, but mysteriously didn't. > > Signed-off-by: Richard Henderson > --- > fpu/softfloat.c | 8 > 1 file changed,

[PATCH 1/3] softfloat: Fix declaration of partsN_compare

2022-04-01 Thread Richard Henderson
The declaration used 'int', while the definition used 'FloatRelation'. This should have resulted in a compiler error, but mysteriously didn't. Signed-off-by: Richard Henderson --- fpu/softfloat.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fpu/softfloat.c b/fpu/so