Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 28 Jan 2015 09:58:43 -0500
From: Rich Felker <>
Subject: Re: Operator precedence issue in fma.c.

On Wed, Jan 28, 2015 at 04:33:53PM +0200, Jukka Jylänki wrote:
> Hi,
> building musl fma.c with Clang/LLVM 3.4, I get the following message:
> fma.c:276:22: warning: ^ has lower precedence than !=; != will be evaluated
> first [-Wparentheses]
>                 if (bits_lost != 1 ^ (int)(uhi.i & 1)) {
>                     ~~~~~~~~~~~~~~~^

I think the ^ operator here is being used as a logical xor rather than
a bitwise one and the code is working as intended, but since I didn't
write it I'll ask and see. If it is correct, I think removing the
spaces around the != and/or adding parens would make it clearer.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.