RE: [GD-Windows] Compiler code gen
Brought to you by:
vexxed72
From: Jon W. <hp...@mi...> - 2004-12-01 00:44:25
|
This is the well-defined behavior both of how arguments get passed through ellipsis, and how the va_arg() macro works. It's just one of those things, like "don't read memory after you've free()-ed it" or "don't use single-equals in conditional expressions." It bites you once, and you learn to deal with it. The type promotion through ellipsis is how ALL arguments got passed to functions back in K&R C -- just be grateful you have the tighter ANSI type scoping for non-ellipsis arguments ;-) Cheers, / h+ -----Original Message----- From: gam...@li... [mailto:gam...@li...]On Behalf Of Brett Bibby Sent: Tuesday, November 30, 2004 3:56 PM To: gam...@li... Subject: Re: [GD-Windows] Compiler code gen Doh! Not very many holes, but one new one. My gripe with CodeWarrior is that it recognizes the float being passed and promotes it to double from the caller, then I try to retrieve it with the type float and obviously it knows that it must promote that to double but doesn't. I'm not sure it's a standard problem as much as their implementation of the va_arg function. Brett |