Re: libc/printf bug



"Nils O. Selåsdal" <NOS@xxxxxxx> writes:

Both, though. The original post hadn't included stdio.h, so all
arguments would be pushed on the stack(typically) as ints. With a
prototype for printf, which accepts varadic arguments, the promotion
rules are different, floats become doubles, char/short become ints and
similar.

The promotion rules are actually the same. But see my other post.
.



Relevant Pages

  • Re: 32 bit or 64 bit alignment ?! gcc options??
    ... ints and longs will both be 4 bytes and will be 4-byte aligned by ... Doubles will be 4-byte aligned, ... what makes you think that this alignment has anything to do ... or a struct is shared but each single element is not shared. ...
    (comp.programming.threads)
  • Re: C performance
    ... >> This is why I was curious about promotion of floats to doubles and back to ... there's no implicit promotion of float to double. ... there's no support for long double wider than ... support 80 bit long doubles very will in Windows. ...
    (comp.lang.c)
  • Re: strange behavior
    ... > a file and loads it into two arrays. ... > *ylist are ints or floats there is no apparent problem. ... > variables are doubles, the program crashes. ... darrell at cs dot toronto dot edu ...
    (comp.lang.c)
  • Re: Can a double always represent an int exactly?
    ... >given that the details of a type realization varies ... I don't know whether the C Standard specifies anything to ... On a machine with 64-bit doubles which follow the IEEE ... On my machine, which has 32-bit ints and 64-bit doubles, ...
    (comp.lang.c)
  • Re: How to quickly print arrays?
    ... > Is there some little utility function that will let me do ... > where a is an array of doubles, ints, or bytes, ...
    (comp.lang.java.programmer)