RE: Compiler code gen
"Paul Bleisch" <[email protected]> Mon, 29 Nov 2004 16:45:03 -0800
| Newsgroups | gmane.games.devel.windows |
|---|---|
| Message-ID | <FD16260E2EDF204E80A22FB904A425C30AC09259@WIN-MSG-10.wingroup.windeploy.ntdev.microsoft.com> |
> -----Original Message----- > From: [email protected] > To: [email protected] > Subject: Re: [GD-Windows] Compiler code gen > > I changed my va_arg(ap, float) to va_arg(ap, double) and it > works now. > Thanks! I think it's questionable that CodeWarrior doesn't > do the right thing when retrieving a float from from va_arg, > but maybe they have a good reason for doing it that way... > Cheers, > Brett As was noted before, this is part of the default argument promotions that C and C++ define as standard. This is more explicit in the ANSI C standard (search for "default argument promotions" in your favorite ANSI C spec). The C++ version handwaves a bit when it comes to the float, int, and enum promotions but (I think) the behavior is the same. Paul ------------------------------------------------------- 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_idU5