From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cxdRF-00082n-Sy for qemu-devel@nongnu.org; Mon, 10 Apr 2017 13:49:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cxdRF-0006Lq-0H for qemu-devel@nongnu.org; Mon, 10 Apr 2017 13:49:17 -0400 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]:33533) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cxdRE-0006LU-Pp for qemu-devel@nongnu.org; Mon, 10 Apr 2017 13:49:16 -0400 Received: by mail-pg0-x242.google.com with SMTP id 79so26567096pgf.0 for ; Mon, 10 Apr 2017 10:49:16 -0700 (PDT) Sender: Richard Henderson References: <20170410060655.32289-1-nikunj@linux.vnet.ibm.com> <20170410194414.7f829fee@bahia.lan> From: Richard Henderson Message-ID: <3b38d5f9-3611-6ec8-df14-a6054d574dc2@twiddle.net> Date: Mon, 10 Apr 2017 10:49:12 -0700 MIME-Version: 1.0 In-Reply-To: <20170410194414.7f829fee@bahia.lan> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH fix for-2.9] cpus: fix wrong define name List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz , Peter Maydell Cc: Nikunj A Dadhania , Peter Crosthwaite , QEMU Developers , Paolo Bonzini , =?UTF-8?Q?Alex_Benn=c3=a9e?= , David Gibson On 04/10/2017 10:44 AM, Greg Kurz wrote: > On Mon, 10 Apr 2017 18:29:57 +0100 > Peter Maydell wrote: > >> On 10 April 2017 at 18:26, Richard Henderson 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~