mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-24 05:01:40 +00:00
Fixed some compiler warnings in lcc...mostly "long double" stuff.
This commit is contained in:
parent
807ba08558
commit
4517e7a34b
3 changed files with 6 additions and 6 deletions
|
@ -81,7 +81,7 @@ typedef struct table *Table;
|
||||||
typedef union value {
|
typedef union value {
|
||||||
long i;
|
long i;
|
||||||
unsigned long u;
|
unsigned long u;
|
||||||
long double d;
|
double d;
|
||||||
void *p;
|
void *p;
|
||||||
void (*g)(void);
|
void (*g)(void);
|
||||||
} Value;
|
} Value;
|
||||||
|
|
|
@ -184,7 +184,7 @@ Tree cnsttree(Type ty, ...) {
|
||||||
switch (ty->op) {
|
switch (ty->op) {
|
||||||
case INT: p->u.v.i = va_arg(ap, long); break;
|
case INT: p->u.v.i = va_arg(ap, long); break;
|
||||||
case UNSIGNED:p->u.v.u = va_arg(ap, unsigned long)&ones(8*ty->size); break;
|
case UNSIGNED:p->u.v.u = va_arg(ap, unsigned long)&ones(8*ty->size); break;
|
||||||
case FLOAT: p->u.v.d = va_arg(ap, long double); break;
|
case FLOAT: p->u.v.d = va_arg(ap, double); break;
|
||||||
case POINTER: p->u.v.p = va_arg(ap, void *); break;
|
case POINTER: p->u.v.p = va_arg(ap, void *); break;
|
||||||
default: assert(0);
|
default: assert(0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -246,15 +246,15 @@ Tree simplify(int op, Type ty, Tree l, Tree r) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CVI+F:
|
case CVI+F:
|
||||||
xcvtcnst(I,l->u.v.i,ty,d,(long double)l->u.v.i);
|
xcvtcnst(I,l->u.v.i,ty,d,(double)l->u.v.i);
|
||||||
case CVU+F:
|
case CVU+F:
|
||||||
xcvtcnst(U,l->u.v.u,ty,d,(long double)l->u.v.u);
|
xcvtcnst(U,l->u.v.u,ty,d,(double)l->u.v.u);
|
||||||
break;
|
break;
|
||||||
case CVF+I:
|
case CVF+I:
|
||||||
xcvtcnst(F,l->u.v.d,ty,i,(long)l->u.v.d);
|
xcvtcnst(F,l->u.v.d,ty,i,(long)l->u.v.d);
|
||||||
break;
|
break;
|
||||||
case CVF+F: {
|
case CVF+F: {
|
||||||
float d;
|
float d = 0.0f;
|
||||||
if (l->op == CNST+F) {
|
if (l->op == CNST+F) {
|
||||||
if (l->u.v.d < ty->u.sym->u.limits.min.d)
|
if (l->u.v.d < ty->u.sym->u.limits.min.d)
|
||||||
d = ty->u.sym->u.limits.min.d;
|
d = ty->u.sym->u.limits.min.d;
|
||||||
|
@ -263,7 +263,7 @@ Tree simplify(int op, Type ty, Tree l, Tree r) {
|
||||||
else
|
else
|
||||||
d = l->u.v.d;
|
d = l->u.v.d;
|
||||||
}
|
}
|
||||||
xcvtcnst(F,l->u.v.d,ty,d,(long double)d);
|
xcvtcnst(F,l->u.v.d,ty,d,(double)d);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BAND+U:
|
case BAND+U:
|
||||||
|
|
Loading…
Reference in a new issue