Post by Vladimir GrigorievAs I guess GCC is a pure compiler. Nevertheless most C programmers which
use it write the macros in their C projects.
Yes, sure. And 95% of all statistic claims on the Usenet are made up out of
thin air just to prove a point. /sarcasm
BTW: I specifically asked about GCC because it has a 'typeof' extension,
which allows creating macro-functions (a bastard between those two) that
don't evaluate the macro arguments each and every time they are used. Then,
they behave like C++ template functions rather and letting them keep their
function look (lowercase instead of uppercase for macros) stops being a
danger.
Alas, even though they could provide a safe version of min/max, the GCC
people chose not to.
Post by Vladimir GrigorievThe macros are selfdocumented
as opposed to the conditional operator.
Nope. They look like functions, which is the first sin and what makes them
definitely non-selfdocumented. Further, which element do they yield when
the two passed arguments are equal? Also, do they return l-values or
r-values?
Snipped further useless amounts of TOFU, were you actually quoting that for
a reason?
Cheers!
Uli
--
C++ FAQ: http://parashift.com/c++-faq-lite
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932