f0e1e8c947
Fixed build problem that was caused by a suspected bug in yacc
42 lines
1.4 KiB
Text
42 lines
1.4 KiB
Text
$NetBSD: patch-ak,v 1.2 2001/04/23 17:33:06 wulf Exp $
|
|
|
|
--- src/SDCCval.c.orig Mon Apr 9 20:40:49 2001
|
|
+++ src/SDCCval.c Mon Apr 9 20:43:10 2001
|
|
@@ -573,7 +573,7 @@
|
|
/*------------------------------------------------------------------*/
|
|
/* floatFromVal - value to unsinged integer conversion */
|
|
/*------------------------------------------------------------------*/
|
|
-double floatFromVal ( value *val )
|
|
+long floatFromVal ( value *val )
|
|
{
|
|
if (!val)
|
|
return 0;
|
|
@@ -586,22 +586,22 @@
|
|
/* if it is not a specifier then we can assume that */
|
|
/* it will be an unsigned long */
|
|
if (!IS_SPEC(val->type))
|
|
- return (double) SPEC_CVAL(val->etype).v_ulong;
|
|
+ return (long) SPEC_CVAL(val->etype).v_ulong;
|
|
|
|
if (SPEC_NOUN(val->etype) == V_FLOAT )
|
|
- return (double) SPEC_CVAL(val->etype).v_float ;
|
|
+ return (long) SPEC_CVAL(val->etype).v_float ;
|
|
else {
|
|
if (SPEC_LONG(val->etype)) {
|
|
if (SPEC_USIGN(val->etype))
|
|
- return (double) SPEC_CVAL(val->etype).v_ulong ;
|
|
+ return (long) SPEC_CVAL(val->etype).v_ulong ;
|
|
else
|
|
- return (double) SPEC_CVAL(val->etype).v_long ;
|
|
+ return (long) SPEC_CVAL(val->etype).v_long ;
|
|
}
|
|
else {
|
|
if (SPEC_USIGN(val->etype))
|
|
- return (double) SPEC_CVAL(val->etype).v_uint ;
|
|
+ return (long) SPEC_CVAL(val->etype).v_uint ;
|
|
else
|
|
- return (double) SPEC_CVAL(val->etype).v_int ;
|
|
+ return (long) SPEC_CVAL(val->etype).v_int ;
|
|
}
|
|
}
|
|
}
|