Archived

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

C bug?

This topic is 5872 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
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