From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: Operator precedence issue in fma.c.
Date: Wed, 28 Jan 2015 09:58:43 -0500 [thread overview]
Message-ID: <20150128145843.GI4574@brightrain.aerifal.cx> (raw)
In-Reply-To: <CA+6sJ-3rKu1sciGkedZUukiw-VJRgbDy1YC6cqKP-xuVMpC46A@mail.gmail.com>
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.
Rich
prev parent reply other threads:[~2015-01-28 14:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-28 14:33 Jukka Jylänki
2015-01-28 14:58 ` Rich Felker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150128145843.GI4574@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).