RE: Compiler code gen
"Jon Watte" <[email protected]> Tue, 30 Nov 2004 16:44:29 -0800
| Newsgroups | gmane.games.devel.windows |
|---|---|
| Message-ID | <[email protected]> |
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: [email protected] [mailto:[email protected]]On Behalf Of Brett Bibby Sent: Tuesday, November 30, 2004 3:56 PM To: [email protected] 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 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ Gamedevlists-windows mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=555