|
From: | Paul Eggert |
Subject: | Re: FYI: [PATCH] utimecmp: avoid new GCC 7 warning from -Wbool-operation |
Date: | Wed, 5 Oct 2016 12:39:18 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 10/05/2016 10:47 AM, Jim Meyering wrote:
we can do the #pragma push/disable-warning/pop dance around that code, but that seems like overkill.
Agreed, it's overkill. Also, I was tempted to suggest -1-x instead of ~(x?1:0) but that assumes two's complement. So let's just leave it alone. At least GCC is smart enough to optimize it as if it were ~x.
I filed a GCC bug report here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77876 I hope they fix it one way or another.
[Prev in Thread] | Current Thread | [Next in Thread] |