On 5/23/13 8:12 , "Stefan Hajnoczi" <stefa...@gmail.com> 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. >> >> Signed-off-by: Tomoki Sekiyama <tomoki.sekiy...@hds.com> >> --- >> 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