From: Richard Henderson <rth@twiddle.net>
To: Greg Kurz <groug@kaod.org>, Peter Maydell <peter.maydell@linaro.org>
Cc: "Nikunj A Dadhania" <nikunj@linux.vnet.ibm.com>,
"Peter Crosthwaite" <crosthwaite.peter@gmail.com>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"David Gibson" <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH fix for-2.9] cpus: fix wrong define name
Date: Mon, 10 Apr 2017 10:49:12 -0700 [thread overview]
Message-ID: <3b38d5f9-3611-6ec8-df14-a6054d574dc2@twiddle.net> (raw)
In-Reply-To: <20170410194414.7f829fee@bahia.lan>
On 04/10/2017 10:44 AM, Greg Kurz wrote:
> On Mon, 10 Apr 2017 18:29:57 +0100
> Peter Maydell <peter.maydell@linaro.org> wrote:
>
>> On 10 April 2017 at 18:26, Richard Henderson <rth@twiddle.net> wrote:
>>> On 04/09/2017 11:06 PM, Nikunj A Dadhania wrote:
>>>> --- a/cpus.c
>>>> +++ b/cpus.c
>>>> @@ -202,7 +202,7 @@ void qemu_tcg_configure(QemuOpts *opts, Error **errp)
>>>> } else if (use_icount) {
>>>> error_setg(errp, "No MTTCG when icount is enabled");
>>>> } else {
>>>> -#ifndef TARGET_SUPPORT_MTTCG
>>>> +#ifndef TARGET_SUPPORTS_MTTCG
>>>
>>>
>>> This sort of thing is why glibc moved to using -Wundef.
>>>
>>> It would be a huge amount of work to convert our existing sources, but it
>>> would probably pay off in the long run.
>>
>> We already build with -Wundef...
>>
>
> From the gcc info page:
>
> '-Wundef'
> Warn if an undefined identifier is evaluated in an '#if' directive.
>
> and BTW, isn't the purpose of #ifndef precisely to detect that the
> identifier is undefined ?
Yes, but it also has the typo problem above, whereas
#if !TARGET_SUPPORTS_MTTCG
plus -Wundef would have caught that error.
r~
next prev parent reply other threads:[~2017-04-10 17:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-10 6:06 [Qemu-devel] [PATCH fix for-2.9] cpus: fix wrong define name Nikunj A Dadhania
2017-04-10 7:56 ` Alex Bennée
2017-04-10 17:26 ` Richard Henderson
2017-04-10 17:29 ` Peter Maydell
2017-04-10 17:31 ` Richard Henderson
2017-04-10 17:44 ` Greg Kurz
2017-04-10 17:49 ` Richard Henderson [this message]
2017-04-10 22:13 ` Greg Kurz
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=3b38d5f9-3611-6ec8-df14-a6054d574dc2@twiddle.net \
--to=rth@twiddle.net \
--cc=alex.bennee@linaro.org \
--cc=crosthwaite.peter@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--cc=nikunj@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).