[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: KNF and the C preprocessor
> (Also, as a side issue, at least one of your examples is invalid.
>> 1 Lazy evaluation: unlike a function call's arguments, a macro's
>> arguments are not evaluated before the macro is "called."
> The C standard makes no such guarantee.)
Actually, I think it does. The standard specifies that the macro call
is semantically equivalent to its expansion. This does not permit the
argument expressions - if they are indeed expressions, which they
aren't always - to be evaluated before the expansion calls for it.
(Unless the "as if" rule permits it anyway, as always.)
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Main Index |
Thread Index |