public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Markus Trippelsdorf <markus@trippelsdorf.de>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Will Deacon <will.deacon@arm.com>,
	Laura Abbott <labbott@redhat.com>,
	John Stultz <john.stultz@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: gcc7 log2 compile issues in kernel/time/timekeeping.c
Date: Sat, 25 Feb 2017 12:09:28 +0100	[thread overview]
Message-ID: <20170225110928.GB1364@x4> (raw)
In-Reply-To: <CAKv+Gu876LoXXiZnhOEksS+r=pqv4U2-OhwvWAiYjGuQ1OT_WA@mail.gmail.com>

On 2017.02.25 at 09:11 +0000, Ard Biesheuvel wrote:
> On 25 February 2017 at 08:18, Markus Trippelsdorf <markus@trippelsdorf.de> wrote:
> >
> > Why not simply get rid of the ____ilog2_NaN thing altogether?
> >
> 
> That would remove the issue, sure. But we lose an opportunity to spot
> incorrect code at compile time.

In the case of kernel/time/timekeeping.c it is clearly a false positive.
Was ever incorrect code spotted by ____ilog2_NaN in the past?

> My concern is that it by not pushing back on changes to the semantics
> of __builtin_constant_p() such as this one, we may start seeing other
> issues where we can no longer use it, and we lose a very useful tool.

We had a long discussion in:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
As you can see there is no real consensus.
But ilog2 seems to be the only place where this ever popped up.
(There were several distro-wide mass rebuilds with gcc-7 and no other
__builtin_constant_p() issue was found yet.)

-- 
Markus

  reply	other threads:[~2017-02-25 11:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23 18:43 gcc7 log2 compile issues in kernel/time/timekeeping.c Laura Abbott
2017-02-24 21:25 ` John Stultz
2017-02-24 21:45   ` Ard Biesheuvel
2017-02-24 23:33     ` Laura Abbott
2017-02-25  8:18       ` Markus Trippelsdorf
2017-02-25  9:11         ` Ard Biesheuvel
2017-02-25 11:09           ` Markus Trippelsdorf [this message]
2017-02-25 11:23             ` Ard Biesheuvel
2017-02-25 11:50               ` Ard Biesheuvel
2017-03-01  0:00                 ` Laura Abbott
2017-03-01 17:39                   ` Ard Biesheuvel
2017-03-02 10:11                     ` Markus Trippelsdorf
2017-03-02 10:38                       ` Ard Biesheuvel
2017-03-02 20:19                         ` Linus Torvalds

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=20170225110928.GB1364@x4 \
    --to=markus@trippelsdorf.de \
    --cc=ard.biesheuvel@linaro.org \
    --cc=john.stultz@linaro.org \
    --cc=labbott@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=will.deacon@arm.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox