All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Bruce Rogers <brogers@novell.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Avoid issue with pp-directive in macro
Date: Fri, 07 Aug 2009 20:44:03 -0500	[thread overview]
Message-ID: <4A7CD863.6000609@codemonkey.ws> (raw)
In-Reply-To: <4A7C531A020000480007DF91@lucius.provo.novell.com>

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 <brogers@novell.com>
>   

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

Regards,

Anthony Liguori

  reply	other threads:[~2009-08-08  1:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-07 22:15 [Qemu-devel] [PATCH] Avoid issue with pp-directive in macro Bruce Rogers
2009-08-08  1:44 ` Anthony Liguori [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-08-10 17:30 Bruce Rogers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A7CD863.6000609@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=brogers@novell.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.