Re: [PATCH] fix: __builtin_bswap{16,32,64}() constantness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 20, 2017 at 9:42 AM, Luc Van Oostenryck
<luc.vanoostenryck@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux