qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Peter Maydell
Subject: Re: [PATCH 1/3] softfloat: Fix declaration of partsN_compare
Date: Fri, 1 Apr 2022 19:12:10 +0100

On Fri, 1 Apr 2022 at 19:08, Richard Henderson
<richard.henderson@linaro.org> 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 C not C++.
>
> The enumeration has values -1 ... 2, which means that the enumeration is 
> compatible with
> an implementation defined signed integer type, which for our set of hosts 
> will be 'int'.
> So, no conflict.

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.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]