This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Promoting floats to doubles?


If there is a prototype, and the prototype specifies float, then the float will not be promoted to double.

It sounds like you have a prototype that disagrees with the function definition, in which case you should fix the prototype.

It turns out I have a real problem on my hands. The OSR5 ABI dictates that floats are always promoted to doubles. I know thats bad and broken, but thats what I have. So even though the prototypes are correct - for example, the particular function that was causing the problem with g77 is prototyped as extern float floorf (float), the OSR5 compiler, which was used to produce libm, promoted the float arg to a double.

I guess one way around this would be to hack this with fixinc
and have it always change the prototypes from float to double.
I can't see any other way around this. Can you?

Kean


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]