[Top][All Lists]

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

Re: [Qemu-devel] [PATCH] Avoid issue with pp-directive in macro

From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] Avoid issue with pp-directive in macro
Date: Fri, 07 Aug 2009 20:44:03 -0500
User-agent: Thunderbird (X11/20090320)

Bruce Rogers wrote:
When building for SLES10, I ran into a build failure which results from printf 
being a macro, and two files which have an #include preprocessing directive 
within the macro arguments.  There are other pp-directives,but the #include was 
the only one causing problems.  (This was with gcc 4.x btw.)

It is undefined behavior to include pp-directives within macro arguments, and 
pretty much any of the std-c defined functions can be implemented as macros, so 
this patch avoids the issue by ensuring we are not using the macro version in 
the problematic cases.

Signed-off-by: Bruce Rogers <address@hidden>

I'd rather just use a %s.  (printf) looks odd.


Anthony Liguori

reply via email to

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