linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christopher Li <sparse@chrisli.org>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: Linux-Sparse <linux-sparse@vger.kernel.org>
Subject: Re: [PATCH] fix: __builtin_bswap{16,32,64}() constantness
Date: Tue, 20 Jun 2017 21:50:33 -0700	[thread overview]
Message-ID: <CANeU7QmjPsZiv-oqMdxZnWc=VwCYcSUegFPpCaocwT5iGiDCQA@mail.gmail.com> (raw)
In-Reply-To: <20170620164253.76292-1-luc.vanoostenryck@gmail.com>

On Tue, Jun 20, 2017 at 9:42 AM, Luc Van Oostenryck
<luc.vanoostenryck@gmail.com> wrote:
> When expanding those builtins, we directly excludes a non-constant
> arg (via the expression expansion cost) and the to retrieve the
> value we use const_expression_value().
>
> But const_expression_value() is to be used for expressions that
> qualify as 'integer constant expression' as per the C standard.
> However we want to be able to use this builtin with all integer
> expressions having a known value at compile time, even those
> not qualified as true 'integer constant expression'.
>
> Fix this by using get_expression_value_silent() instead of
> const_expression_value().

Looks good to me.

Chris

      reply	other threads:[~2017-06-21  4:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-20 16:42 [PATCH] fix: __builtin_bswap{16,32,64}() constantness Luc Van Oostenryck
2017-06-21  4:50 ` Christopher Li [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='CANeU7QmjPsZiv-oqMdxZnWc=VwCYcSUegFPpCaocwT5iGiDCQA@mail.gmail.com' \
    --to=sparse@chrisli.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=luc.vanoostenryck@gmail.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;
as well as URLs for NNTP newsgroup(s).