qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] scripts: add a guard macro in generated .h file


From: Tristan Gingold
Subject: Re: [Qemu-devel] [PATCH] scripts: add a guard macro in generated .h files
Date: Mon, 21 Feb 2011 07:42:10 +0100

On Feb 20, 2011, at 7:14 PM, Aurelien Jarno wrote:

> On Mon, Feb 07, 2011 at 04:21:40PM +0100, Tristan Gingold wrote:
>> To avoid redefinition warnings.
> config-host.h only contains #define entries, and GCC doesn't choke when
> as long as the definitions are the same. What is the use case of this
> patch? 

Mostly a style issue.  It is common to always protect header files against 
multiple inclusion, unless the header is meant to be
included several times (which is not the case for these config files).  I think 
this is a good practice.

I once got redefinition warnings for macros in config-host.h, but I agree that 
adding the guard macro doesn't fix this issue.

If you agree that adding guards is harmless and good style, I can change the 
comment.

Tristan.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]