linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [gustavoars-linux:for-next/clang-fallthrough 1/1] warning: fallthrough annotation in unreachable code
@ 2021-08-05  6:21 kernel test robot
  2021-08-05 19:04 ` [gustavoars-linux:for-next/clang-fallthrough 1/1] warning: fallthrough annotation in unreachable code/ Nathan Chancellor
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-08-05  6:21 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: clang-built-linux, kbuild-all, Gustavo A. R. Silva, LKML

[-- Attachment #1: Type: text/plain, Size: 1505 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git for-next/clang-fallthrough
head:   58d0d2d2e7dc1b1a4997bb9c47d6cf428f2d3a00
commit: 58d0d2d2e7dc1b1a4997bb9c47d6cf428f2d3a00 [1/1] Revert "Revert "Makefile: Enable -Wimplicit-fallthrough for Clang""
config: hexagon-randconfig-r023-20210804 (attached as .config)
compiler: clang version 12.0.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/commit/?id=58d0d2d2e7dc1b1a4997bb9c47d6cf428f2d3a00
        git remote add gustavoars-linux https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git
        git fetch --no-tags gustavoars-linux for-next/clang-fallthrough
        git checkout 58d0d2d2e7dc1b1a4997bb9c47d6cf428f2d3a00
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=hexagon 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough]
>> warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough]
   2 warnings generated.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 21971 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gustavoars-linux:for-next/clang-fallthrough 1/1] warning: fallthrough annotation in unreachable code/
  2021-08-05  6:21 [gustavoars-linux:for-next/clang-fallthrough 1/1] warning: fallthrough annotation in unreachable code kernel test robot
@ 2021-08-05 19:04 ` Nathan Chancellor
  2021-08-05 21:52   ` Gustavo A. R. Silva
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2021-08-05 19:04 UTC (permalink / raw)
  To: kernel test robot
  Cc: Gustavo A. R. Silva, clang-built-linux, kbuild-all,
	Gustavo A. R. Silva, LKML

On Thu, Aug 05, 2021 at 02:21:34PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git for-next/clang-fallthrough
> head:   58d0d2d2e7dc1b1a4997bb9c47d6cf428f2d3a00
> commit: 58d0d2d2e7dc1b1a4997bb9c47d6cf428f2d3a00 [1/1] Revert "Revert "Makefile: Enable -Wimplicit-fallthrough for Clang""
> config: hexagon-randconfig-r023-20210804 (attached as .config)
> compiler: clang version 12.0.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/commit/?id=58d0d2d2e7dc1b1a4997bb9c47d6cf428f2d3a00
>         git remote add gustavoars-linux https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git
>         git fetch --no-tags gustavoars-linux for-next/clang-fallthrough
>         git checkout 58d0d2d2e7dc1b1a4997bb9c47d6cf428f2d3a00
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=hexagon 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
> >> warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough]
> >> warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough]
>    2 warnings generated.

With a newer version of clang that shows proper line numbers:

sound/core/pcm_native.c:3812:3: warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough]
                fallthrough;
                ^
include/linux/compiler_attributes.h:211:41: note: expanded from macro 'fallthrough'
# define fallthrough                    __attribute__((__fallthrough__))
                                        ^
sound/core/pcm_native.c:3820:3: warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough]
                fallthrough;
                ^
include/linux/compiler_attributes.h:211:41: note: expanded from macro 'fallthrough'
# define fallthrough                    __attribute__((__fallthrough__))
                                        ^
2 warnings generated.

Which is already being tracked: https://github.com/ClangBuiltLinux/linux/issues/1429

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gustavoars-linux:for-next/clang-fallthrough 1/1] warning: fallthrough annotation in unreachable code/
  2021-08-05 19:04 ` [gustavoars-linux:for-next/clang-fallthrough 1/1] warning: fallthrough annotation in unreachable code/ Nathan Chancellor
@ 2021-08-05 21:52   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2021-08-05 21:52 UTC (permalink / raw)
  To: Nathan Chancellor, kernel test robot
  Cc: Gustavo A. R. Silva, clang-built-linux, kbuild-all, LKML



On 8/5/21 14:04, Nathan Chancellor wrote:
> On Thu, Aug 05, 2021 at 02:21:34PM +0800, kernel test robot wrote:
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git for-next/clang-fallthrough
>> head:   58d0d2d2e7dc1b1a4997bb9c47d6cf428f2d3a00
>> commit: 58d0d2d2e7dc1b1a4997bb9c47d6cf428f2d3a00 [1/1] Revert "Revert "Makefile: Enable -Wimplicit-fallthrough for Clang""
>> config: hexagon-randconfig-r023-20210804 (attached as .config)
>> compiler: clang version 12.0.0
>> reproduce (this is a W=1 build):
>>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>         chmod +x ~/bin/make.cross
>>         # https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/commit/?id=58d0d2d2e7dc1b1a4997bb9c47d6cf428f2d3a00
>>         git remote add gustavoars-linux https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git
>>         git fetch --no-tags gustavoars-linux for-next/clang-fallthrough
>>         git checkout 58d0d2d2e7dc1b1a4997bb9c47d6cf428f2d3a00
>>         # save the attached .config to linux build tree
>>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=hexagon 
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>> All warnings (new ones prefixed by >>):
>>
>>>> warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough]
>>>> warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough]
>>    2 warnings generated.
> 
> With a newer version of clang that shows proper line numbers:

Yep; I've been using mainline since you told us about commit
	
	1b4800c26259 ("[clang][parser] Set source ranges for GNU-style attributes")

:)

> Which is already being tracked: https://github.com/ClangBuiltLinux/linux/issues/1429

Hopefully, this will be solved soon: https://bugs.llvm.org/show_bug.cgi?id=51094 (fingers crossed).

Thanks
--
Gustavo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-05 21:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05  6:21 [gustavoars-linux:for-next/clang-fallthrough 1/1] warning: fallthrough annotation in unreachable code kernel test robot
2021-08-05 19:04 ` [gustavoars-linux:for-next/clang-fallthrough 1/1] warning: fallthrough annotation in unreachable code/ Nathan Chancellor
2021-08-05 21:52   ` Gustavo A. R. Silva

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).