Received: from eggs.gnu.org ([208.118.235.92]:53986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfaLw-0003gr-MM for qemu-devel@nongnu.org; Thu, 23 May 2013 14:35:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfaLp-0008Sy-1S for qemu-devel@nongnu.org; Thu, 23 May 2013 14:35:04 -0400 Received: from usindpps06.hds.com ([207.126.252.19]:58937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfaLo-0008St-Nl for qemu-devel@nongnu.org; Thu, 23 May 2013 14:34:56 -0400 From: Tomoki Sekiyama Date: Thu, 23 May 2013 18:34:43 +0000 Message-ID: In-Reply-To: <20130523121229.GJ9093@stefanha-thinkpad.redhat.com> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-ID: <5C132B85FD638C468B2670496D6516C1@hds.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC PATCH v3 02/11] Fix errors and warnings while compiling with c++ compilier List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: "mdroth@linux.vnet.ibm.com" , "qemu-devel@nongnu.org" , "lcapitulino@redhat.com" , "vrozenfe@redhat.com" , "pbonzini@redhat.com" , Seiji Aguchi , "areis@redhat.com" On 5/23/13 8:12 , "Stefan Hajnoczi" wrote: >On Tue, May 21, 2013 at 11:33:41AM -0400, Tomoki Sekiyama wrote: >> Add C++ keywords to avoid errors in compiling with c++ compiler. >> This also renames class member of PciDeviceInfo to q_class. >>=20 >> Signed-off-by: Tomoki Sekiyama >> --- >> hmp.c | 2 +- >> hw/pci/pci.c | 2 +- >> scripts/qapi.py | 9 ++++++++- >> 3 files changed, 10 insertions(+), 3 deletions(-) > >Please also extend scripts/checkpatch.pl. Otherwise it is very likely >that C++ keywords will be introduced again in the future. Most people >will not build the VSS code and therefore checkpatch.pl needs to ensure >that patches with C++ keywords will not be accepted. > >Stefan I think it would be difficult to identify problematic C++ keywords usage from patches because headers can legally contain C++ keywords and checkpatch.pl doesn't know where it should be used. Do you have any good ideas? And, at least for QAPI, scripts/qapi.py automatically detects the keywords to add q_ prefix for them (like `q_class' in this patch). Thanks, Tomoki Sekiyama