From: Progyan Bhattacharya <bprogyan@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>,
Josh Poimboeuf <jpoimboe@redhat.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
Nick Desaulniers <nick.desaulniers@gmail.com>,
Lukas Bulwahn <lukas.bulwahn@gmail.com>,
Nicholas Mc Guire <der.herr@hofr.at>
Subject: Re: [PATCH] objtool/x86: Replace Non-standard Range Expression in Case
Date: Sun, 18 Feb 2018 09:06:52 +0530 [thread overview]
Message-ID: <1518925012.5730.0.camel@gmail.com> (raw)
In-Reply-To: <20180216164722.GF25201@hirez.programming.kicks-ass.net>
On Fri, 2018-02-16 at 17:47 +0100, Peter Zijlstra wrote:
> On Fri, Feb 16, 2018 at 08:35:11AM -0600, Josh Poimboeuf wrote:
> > On Fri, Feb 16, 2018 at 07:55:13PM +0530, Progyan Bhattacharya
> > wrote:
> > > Replace range expressions with seperate individual cases, i.e.
> > > convert case 1...3: to case 1: case 2: case 3
> > > Range expression within case statements are non-standard C code
> > > and can create issues over compiler and platform variety.
> > >
> > > While compiling with gcc 4.8 (RHEL) I encountered this error on
> > > range expression in case statements:
> > > error: range expressions in switch statements are non-standard [-
> > > Werror=pedantic]
> > >
> > > Signed-off-by: Progyan Bhattacharya <progyanb@acm.org>
> >
> > Hi Progyan,
> >
> > Thank you for the patch.
> >
> > I think this makes the code unnecessarily verbose and less
> > readable. We
> > rely on many such GCC extensions, and we don't aim to comply with
> > standard C. And AFAIK, we don't use -Werror=pedantic in the
> > kernel.
>
> Agreed, it makes the code actively worse. Just don't use
> error=pedantic.
But I cannot figure it out how Werror=pedantic flag is being set. :(
--
Regards,
Progyan Bhattacharya
(http://codeprogyan.me)
next prev parent reply other threads:[~2018-02-18 3:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-16 14:19 [PATCH] objtool/x86: Replace Non-standard Range Expression in Case Progyan Bhattacharya
2018-02-16 14:25 ` Progyan Bhattacharya
2018-02-16 14:35 ` Josh Poimboeuf
2018-02-16 16:47 ` Peter Zijlstra
2018-02-18 3:36 ` Progyan Bhattacharya [this message]
2018-02-16 14:39 ` Progyan Bhattacharya
2018-02-16 15:03 ` Josh Poimboeuf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1518925012.5730.0.camel@gmail.com \
--to=bprogyan@gmail.com \
--cc=der.herr@hofr.at \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
--cc=mingo@kernel.org \
--cc=nick.desaulniers@gmail.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox