Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Diodor

C bug?

This topic is 6085 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm aware how newbie-like this makes me sound, but this is the explanation I have so far. As discussed in this thread it appears that passing a float to vararg functions like printf results in a double being pushed on the stack. Any reason for this? Any way to disable this behavior? Edited by - Diodor on November 17, 2001 8:38:48 AM

Share this post


Link to post
Share on other sites
Advertisement
This has nothing to do with C++, but is the standard way C passes arguments. All floating-point arguments (float and double) are passed as doubles, while integer arguments (char, short, int) are passed as int''s (or was it long''s, I can''t remember).

-Neophyte

- Death awaits you all with nasty, big, pointy teeth. -

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!