qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] PPC build errors in CVS


From: Daniel Jacobowitz
Subject: Re: [Qemu-devel] PPC build errors in CVS
Date: Sun, 7 Oct 2007 18:40:04 -0400
User-agent: Mutt/1.5.15 (2007-04-09)

On Sun, Oct 07, 2007 at 11:45:51PM +0200, J. Mayer wrote:
> I also took a look in C 99 specification and I saw no restriction on
> writing:
> do_this(a,
> #ifdef _this_is_defined
>       b,
> #else
>       c,
> #endif
>       d);
> when do_this() is defined as a macro.
> 
> May I suggest you to use a C99 compliant compiler ?
> I don't feel like making my code less readable just because some use
> buggy compilers. (but if someone tells me what in the ISO C
> specification, that I would have missed, explicitelly forbids this).

I'm pretty sure that it was either forbidden or unspecified, at least
in C89.  I didn't check C99.

http://gcc.gnu.org/ml/gcc/1999-07n/msg00243.html

> ISO says in 6.8.3 (Macro replacement): "If there are sequences of
> preprocessing tokens within the list of arguments that would otherwise
> act as preprocessing directives, the behavior is undefined."

GCC did not support it until here:

http://gcc.gnu.org/ml/gcc-patches/2002-02/msg01874.html

-- 
Daniel Jacobowitz
CodeSourcery




reply via email to

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