2 A bug which resulted in LLVM-compiled SDCC crashing.
9 #if !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Not enough memory
10 float simplified_atof(const char * s
)
12 float value
, fraction
;
15 for (value
=0.0; isdigit(*s
); s
++)
17 value
=10.0*value
+(*s
-'0');
23 for (fraction
=0.1; isdigit(*s
); s
++)
25 value
+=(*s
-'0')*fraction
;
33 iexp
=(signed char)atoi(s
);
57 #if !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Not enough memory
58 ASSERT(simplified_atof("0.0f") == 0.0f
);