From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MZayj-0006WN-2R for qemu-devel@nongnu.org; Fri, 07 Aug 2009 21:44:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MZayd-0006VT-ME for qemu-devel@nongnu.org; Fri, 07 Aug 2009 21:44:11 -0400 Received: from [199.232.76.173] (port=52170 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MZayd-0006VQ-G6 for qemu-devel@nongnu.org; Fri, 07 Aug 2009 21:44:07 -0400 Received: from mail-qy0-f174.google.com ([209.85.221.174]:58781) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MZayd-0006o1-3m for qemu-devel@nongnu.org; Fri, 07 Aug 2009 21:44:07 -0400 Received: by qyk4 with SMTP id 4so1764711qyk.4 for ; Fri, 07 Aug 2009 18:44:06 -0700 (PDT) Message-ID: <4A7CD863.6000609@codemonkey.ws> Date: Fri, 07 Aug 2009 20:44:03 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Avoid issue with pp-directive in macro References: <4A7C531A020000480007DF91@lucius.provo.novell.com> In-Reply-To: <4A7C531A020000480007DF91@lucius.provo.novell.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bruce Rogers Cc: qemu-devel@nongnu.org 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 > I'd rather just use a %s. (printf) looks odd. Regards, Anthony Liguori