<div dir='auto'>11.2.1</div><div class="gmail_extra"><br><div class="gmail_quote">Le 29 sept. 2021 20:10, "Zebediah Figura (she/her)" <zfigura@codeweavers.com> a écrit :<br type="attribution" /><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">On 9/29/21 12:59, Eric Pouech wrote: <br>
> Le 29/09/2021 à 17:57, Zebediah Figura (she/her) a écrit : <br>
>> On 9/29/21 02:43, Eric Pouech wrote: <br>
>>> Le 28/09/2021 à 20:01, Zebediah Figura (she/her) a écrit : <br>
>>>> On 9/28/21 11:49, Eric Pouech wrote: <br>
>>>>> Signed-off-by: Eric Pouech <eric.pouech@gmail.com> <br>
>>>>> <br>
>>>>> --- <br>
>>>>>   dlls/msvcrt/math.c |    2 +- <br>
>>>>>   1 file changed, 1 insertion(+), 1 deletion(-) <br>
>>>>> <br>
>>>>> diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c <br>
>>>>> index 7f59a4d20d4..ad632e70548 100644 <br>
>>>>> --- a/dlls/msvcrt/math.c <br>
>>>>> +++ b/dlls/msvcrt/math.c <br>
>>>>> @@ -5643,7 +5643,7 @@ unsigned int CDECL _control87(unsigned int  <br>
>>>>> newval, unsigned int mask) <br>
>>>>>   { <br>
>>>>>       unsigned int flags = 0; <br>
>>>>>   #ifdef __i386__ <br>
>>>>> -    unsigned int sse2_cw; <br>
>>>>> +    unsigned int sse2_cw = 0; <br>
>>>>>         __control87_2( newval, mask, &flags, &sse2_cw ); <br>
>>>>> <br>
>>>>> <br>
>>>> <br>
>>>> Wouldn't it be better to check for failure from __control87_2()? <br>
>>>> <br>
>>> unfortunately, gcc11 still complains when checking for failure of  <br>
>>> _control87_2() <br>
>>> <br>
>>> gcc doesn't seem to be smart enough to infer that ss2_cw is always  <br>
>>> when _control87_2() returns 1 <br>
>> <br>
>> That doesn't match what I have here. With the attached patch gcc 11.1  <br>
>> doesn't complain. <br>
>  <br>
> what I tried is: <br>
>  <br>
> diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c <br>
> index 7f59a4d20d4..4560040eb9f 100644 <br>
> --- a/dlls/msvcrt/math.c <br>
> +++ b/dlls/msvcrt/math.c <br>
> @@ -5645,10 +5645,11 @@ unsigned int CDECL _control87(unsigned int  <br>
> newval, unsigned int mask) <br>
>   #ifdef __i386__ <br>
>       unsigned int sse2_cw; <br>
>  <br>
> -    __control87_2( newval, mask, &flags, &sse2_cw ); <br>
> - <br>
> -    if ((flags ^ sse2_cw) & (_MCW_EM | _MCW_RC)) flags |= _EM_AMBIGUOUS; <br>
> -    flags |= sse2_cw; <br>
> +    if (__control87_2( newval, mask, &flags, &sse2_cw )) <br>
> +    { <br>
> +        if ((flags ^ sse2_cw) & (_MCW_EM | _MCW_RC)) flags |=  <br>
> _EM_AMBIGUOUS; <br>
> +        flags |= sse2_cw; <br>
> +    } <br>
>   #else <br>
>       flags = newval; <br>
>       _setfp(&flags, mask, NULL, 0); <br>
>  <br>
>  <br>
> which still gives me the warnings, when compiling the 32bit part of a  <br>
> wow64 conf <br>
>  <br>
> (but not on a pure 32bit conf) <br>
>  <br>
> your solution doesn't generate warnings on neither of the two <br>
>  <br>
> so will need further investigation on: <br>
>  <br>
> - discrepency wrt wow <br>
>  <br>
> - why the difference between the two patches <br>
<br>
I don't get warnings with that diff either. What version of GCC do you have? <br>
</p>
</blockquote></div><br></div>