From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Progyan Bhattacharya <bprogyan@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.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: Fri, 16 Feb 2018 08:35:11 -0600 [thread overview]
Message-ID: <20180216143511.fo4emxz6webqk7qn@treble> (raw)
In-Reply-To: <20180216142513.9520-1-progyanb@acm.org>
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.
--
Josh
next prev parent reply other threads:[~2018-02-16 14:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-16 14:19 Progyan Bhattacharya
2018-02-16 14:25 ` Progyan Bhattacharya
2018-02-16 14:35 ` Josh Poimboeuf [this message]
2018-02-16 16:47 ` Peter Zijlstra
2018-02-18 3:36 ` Progyan Bhattacharya
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=20180216143511.fo4emxz6webqk7qn@treble \
--to=jpoimboe@redhat.com \
--cc=bprogyan@gmail.com \
--cc=der.herr@hofr.at \
--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
all inboxes | Powered by JetHome®