lkml.org 
[lkml]   [2016]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] byteswap: try to avoid __builtin_constant_p gcc bug
Date
On Wednesday, June 22, 2016 2:44:21 PM CEST Tomas Winkler wrote:
> >
> > There are more than 20 files that have the statement: case cpu_to_...
> > Sparse complains about: case __builtin_bswap, not about __builtin_constant_p.
>
> There is even much more in the header files used in initializers,
> which also require constants. I wonder if __builtin_bswap produces
> constant expression correctly under gcc?

In gcc-4.8 or later yes. gcc-4.6/4.7 on powerpc was a special case that we
have worked around now, as the 16-bit byteswap there was not a constant
expression, unlike the 32-bit and 64-bit ones.

Arnd

\
 
 \ /
  Last update: 2016-06-22 15:01    [W:0.098 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site