Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1428751
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] byteswap: try to avoid __builtin_constant_p gcc bug |
| Date | 2016-06-22 14:40 +0200 |
| Message-ID | <rMPBM-3lU-9@gated-at.bofh.it> (permalink) |
| References | <rutT5-3cr-19@gated-at.bofh.it> <rMNJD-2bS-3@gated-at.bofh.it> <rMOPn-2Q3-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v2] byteswap: try to avoid __builtin_constant_p gcc bug Tomas Winkler <tomasw@gmail.com> - 2016-06-21 11:20 +0200
Re: [PATCH v2] byteswap: try to avoid __builtin_constant_p gcc bug Tomas Winkler <tomasw@gmail.com> - 2016-06-22 10:40 +0200
Re: [PATCH v2] byteswap: try to avoid __builtin_constant_p gcc bug Arnd Bergmann <arnd@arndb.de> - 2016-06-22 12:20 +0200
RE: [PATCH v2] byteswap: try to avoid __builtin_constant_p gcc bug "Levy, Amir (Jer)" <amir.jer.levy@intel.com> - 2016-06-22 12:40 +0200
Re: [PATCH v2] byteswap: try to avoid __builtin_constant_p gcc bug Tomas Winkler <tomasw@gmail.com> - 2016-06-22 13:50 +0200
Re: [PATCH v2] byteswap: try to avoid __builtin_constant_p gcc bug Arnd Bergmann <arnd@arndb.de> - 2016-06-22 14:40 +0200
Re: [PATCH v2] byteswap: try to avoid __builtin_constant_p gcc bug Tomas Winkler <tomasw@gmail.com> - 2016-06-23 08:30 +0200
Re: [PATCH v2] byteswap: try to avoid __builtin_constant_p gcc bug Arnd Bergmann <arnd@arndb.de> - 2016-06-23 11:30 +0200
csiph-web