lkml.org 
[lkml]   [2014]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] checkpatch: Allow case labels with ranges
On Mon, 21 Jul 2014, Joe Perches wrote:

> On Mon, 2014-07-21 at 14:21 +0100, Lee Jones wrote:
> > On Mon, 21 Jul 2014, Joe Perches wrote:
> > > The MISSING_BREAK / fallthrough test does not support
> > > gcc's extension for case labels with ranges.
> []
> > Yep, that's much worse [1] - I wish I never mentioned it. ;)
>
> I'm glad you did actually.
>
> The code itself:
>
> bool foo(int bar)
> {
> case (bar) {
> case 1:
> case 2:
> case 4:
> return true;
> default:
> return false;
> }
>
> should not emit any error.

That's why I submitted the report.

> I'll fix it soon.

Brilliant, thanks Joe!

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-07-21 19:21    [W:0.076 / U:1.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site