RE: [GD-Windows] Compiler code gen
Brought to you by:
vexxed72
From: Jon W. <hp...@mi...> - 2004-11-30 22:06:46
|
> I guess his point is that va_arg(ap, float) as defined is always going to do > the wrong thing because variable argument lists can never contain floats. I > don't know how that could be fixed, considering that va_arg() is essentially > a macro hack created to avoid adding language constructs. In C++, you could catch that use with a compile-time assert. In both C and C++ you can actually pass floats by using unions, and/or type punning. Thus, being able to specify float as the argument for va_arg() isn't entirely useless -- but, as many things, may cause hole in the feet of previously inexperienced programmers. Corollary: experience is directly proportional to the number of holes in your feet, thus more experienced programmers walk slower. Cheers, / h+ |