No double with 64 library?

Bug reports (if you don't/won't have a Github account)
Post Reply
joaopa
Member
Posts: 46
Joined: Sat Mar 15, 2014 5:42 pm

No double with 64 library?

Post by joaopa »

Hello,

whe trying compiling with 64-bit library, I obtain the following message
warning 93: type 'double' not supported assuming 'float'

How can I enable double?

Thanks in advance
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

Post by alvin »

joaopa wrote:Hello,

whe trying compiling with 64-bit library, I obtain the following message
warning 93: type 'double' not supported assuming 'float'

How can I enable double?
Both compilers only support one floating point type. That's a warning from sdcc saying it's going to use float instead of double. The program will still compile but there is no distinction between float and double.

Newer C standards (and the new c lib in z88dk) have defined types "float_t" and "double_t" in math.h and stdlib.h to give the library flexibility in defining what a float and double is. If you use "float_t" and "double_t" in place of "float" and "double" these compiler warnings will go away (but float and double will still be the same thing).

One downside with sdcc is its float type is only 32-bit versus sccz80's 48-bit so it's not quite as precise if you are used to sccz80.
Post Reply