From: Peter Maydell <peter.maydell@linaro.org>
To: Stefan Weil <sw@weilnetz.de>
Cc: Alexander Graf <agraf@suse.de>,
QEMU Developers <qemu-devel@nongnu.org>,
Blue Swirl <blauwirbel@gmail.com>,
"open list:PowerPC" <qemu-ppc@nongnu.org>,
Paul Brook <paul@codesourcery.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
Aurelien Jarno <aurelien@aurel32.net>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 5/8] tcg: Remove stray semi-colons from target-*/helper.h
Date: Sun, 15 Sep 2013 11:44:01 +0100 [thread overview]
Message-ID: <CAFEAcA87Ry3ON_htDiX2Z4E8ZSzz=rqHm0BNS9cESSDHfnLsLA@mail.gmail.com> (raw)
In-Reply-To: <52355BB6.4070904@weilnetz.de>
On 15 September 2013 08:03, Stefan Weil <sw@weilnetz.de> wrote:
> Instead of removing the semicolons from the DEF_HELPER_x lines,
> I'd prefer removing them from the DEF_HELPER_FLAGS_x definitions.
>
> Code formatters and static code analyzers (maybe humans, too) prefer
> lines which look like valid C syntax, therefore
>
> DEF_HELPER_FLAGS_1(ctpop, TCG_CALL_NO_RWG_SE, i64, i64);
>
> is better for such tools than
>
> DEF_HELPER_FLAGS_1(ctpop, TCG_CALL_NO_RWG_SE, i64, i64)
I agree it looks nicer, but for this kind of multipurpose macro definition
where one of the redefinitions is used for things like creating a
data structure (eg Richard's patch 6/8 in this series) it just doesn't
work, because the required separator for entries in an array is a comma,
not a semicolon.
It's just an unavoidable cost of doing this with the preprocessor
rather than (say) a custom little language which we parsed with
a python or perl script.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
-- PMM
next prev parent reply other threads:[~2013-09-15 10:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-15 0:03 [Qemu-devel] [PATCH 0/8] tcg: Tidy helpers registration Richard Henderson
2013-09-15 0:03 ` [Qemu-devel] [PATCH 1/8] tcg: Delete tcg_helper_get_name declaration Richard Henderson
2013-09-15 6:14 ` Stefan Weil
2013-09-15 0:03 ` [Qemu-devel] [PATCH 2/8] tcg: Use a GHashTable for tcg_find_helper Richard Henderson
2013-09-15 6:32 ` Stefan Weil
2013-09-15 0:03 ` [Qemu-devel] [PATCH 3/8] target-m68k: Rename helpers.h to helper.h Richard Henderson
2013-09-15 6:35 ` Stefan Weil
2013-09-15 0:03 ` [Qemu-devel] [PATCH 4/8] tcg: Move helper registration into tcg_context_init Richard Henderson
2013-09-15 0:03 ` [Qemu-devel] [PATCH 5/8] tcg: Remove stray semi-colons from target-*/helper.h Richard Henderson
2013-09-15 7:03 ` Stefan Weil
2013-09-15 10:44 ` Peter Maydell [this message]
2013-09-15 0:03 ` [Qemu-devel] [PATCH 6/8] tcg: Put target helper data into an array Richard Henderson
2013-09-15 0:03 ` [Qemu-devel] [PATCH 7/8] tcg: Add tcg-runtime.c helpers to all_helpers Richard Henderson
2013-09-15 0:03 ` [Qemu-devel] [PATCH 8/8] tcg: Merge tcg_register_helper into tcg_context_init Richard Henderson
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='CAFEAcA87Ry3ON_htDiX2Z4E8ZSzz=rqHm0BNS9cESSDHfnLsLA@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=agraf@suse.de \
--cc=aurelien@aurel32.net \
--cc=blauwirbel@gmail.com \
--cc=edgar.iglesias@gmail.com \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rth@twiddle.net \
--cc=sw@weilnetz.de \
/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;
as well as URLs for NNTP newsgroup(s).