Re: [PATCH] bitops: avoid clang shift-count-overflow warnings

2020-05-05 Thread Arnd Bergmann
On Tue, May 5, 2020 at 5:36 PM 'Nick Desaulniers' via Clang Built Linux wrote: > On Tue, May 5, 2020 at 8:33 AM Arnd Bergmann wrote: > > > > I'm not sure if there is anything to be done about it in clang, since it > > always does syntactic analysis before dead-code elimination by design. > > That

Re: [PATCH] bitops: avoid clang shift-count-overflow warnings

2020-05-05 Thread Nick Desaulniers
On Tue, May 5, 2020 at 8:33 AM Arnd Bergmann wrote: > > On Tue, May 5, 2020 at 4:08 PM Andy Shevchenko > wrote: > > On Tue, May 5, 2020 at 4:58 PM Arnd Bergmann wrote: > > > Clang normally does not warn about certain issues in inline functions when > > > it only happens in an eliminated code pat

Re: [PATCH] bitops: avoid clang shift-count-overflow warnings

2020-05-05 Thread Arnd Bergmann
On Tue, May 5, 2020 at 4:08 PM Andy Shevchenko wrote: > On Tue, May 5, 2020 at 4:58 PM Arnd Bergmann wrote: > > Clang normally does not warn about certain issues in inline functions when > > it only happens in an eliminated code path. However if something else > > goes wrong, it does tend to comp

Re: [PATCH] bitops: avoid clang shift-count-overflow warnings

2020-05-05 Thread Andy Shevchenko
On Tue, May 5, 2020 at 4:58 PM Arnd Bergmann wrote: > > Clang normally does not warn about certain issues in inline functions when > it only happens in an eliminated code path. However if something else > goes wrong, it does tend to complain about the definition of hweight_long() > on 32-bit targe

Re: [PATCH] bitops: avoid clang shift-count-overflow warnings

2020-05-05 Thread Christian Brauner
On Tue, May 05, 2020 at 03:54:57PM +0200, Arnd Bergmann wrote: > Clang normally does not warn about certain issues in inline functions when > it only happens in an eliminated code path. However if something else > goes wrong, it does tend to complain about the definition of hweight_long() > on 32-b

[PATCH] bitops: avoid clang shift-count-overflow warnings

2020-05-05 Thread Arnd Bergmann
Clang normally does not warn about certain issues in inline functions when it only happens in an eliminated code path. However if something else goes wrong, it does tend to complain about the definition of hweight_long() on 32-bit targets: include/linux/bitops.h:75:41: error: shift count >= width