compiler/libec: (#341, #351, #644, #771) Improved enum type matching and type handlin...
[sdk] / compiler / bootstrap / libec / bootstrap / pass15.c
index df084c3..41ec3f3 100644 (file)
@@ -488,6 +488,7 @@ unsigned int isConstant;
 unsigned int addedThis;
 unsigned int needCast;
 unsigned int thisPtr;
+unsigned int opDestType;
 } __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
@@ -679,7 +680,7 @@ char *  name;
 struct __ecereNameSpace__ecere__sys__OldList methods;
 struct __ecereNameSpace__ecere__sys__OldList properties;
 unsigned int itself;
-unsigned int isRemote;
+int isRemote;
 } __attribute__ ((gcc_struct));
 
 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
@@ -851,7 +852,7 @@ unsigned int noExpansion;
 char *  defaultProperty;
 unsigned int comRedefinition;
 int count;
-unsigned int isRemote;
+int isRemote;
 unsigned int internalDecl;
 void *  data;
 unsigned int computeSize;
@@ -1221,6 +1222,8 @@ unsigned int thisClassParams = 0x1;
 
 unsigned int internalValueCounter;
 
+extern unsigned int outputLineNumbers;
+
 extern void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f);
 
 extern size_t strlen(const char * );
@@ -1240,7 +1243,9 @@ void PrintExpression(struct Expression * exp, char * string)
 {
 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
 int count;
+unsigned int backOutputLineNumbers = outputLineNumbers;
 
+outputLineNumbers = 0x0;
 if(exp)
 OutputExpression(exp, f);
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
@@ -1256,6 +1261,7 @@ __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpa
 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(f, string + count, 1, 1023);
 string[count] = '\0';
 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
+outputLineNumbers = backOutputLineNumbers;
 }
 }
 
@@ -1526,9 +1532,11 @@ char * PrintHexUInt(uint64 result)
 char temp[100];
 
 if(result > (0xffffffff))
-sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
+sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
 else
 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
+if(result > (0xffffffff))
+strcat(temp, "LL");
 return __ecereNameSpace__ecere__sys__CopyString(temp);
 }
 
@@ -3108,6 +3116,7 @@ struct Declaration * decl;
 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0));
 char structName[1024];
+struct Specifier * spec = (((void *)0));
 
 external = (classSym->registered && classSym->registered->type == 1) ? classSym->pointerExternal : classSym->structExternal;
 classSym->declaring++;
@@ -3123,7 +3132,15 @@ return ;
 DeclareMembers(classSym->registered, 0x0);
 structName[0] = (char)0;
 FullClassNameCat(structName, name, 0x0);
-if(!skipNoHead)
+if(external && external->declaration && external->declaration->specifiers)
+{
+for(spec = (*external->declaration->specifiers).first; spec; spec = spec->next)
+{
+if(spec->type == 3 || spec->type == 4)
+break;
+}
+}
+if(!skipNoHead && (!spec || !spec->definitions))
 {
 unsigned int addedPadding = 0x0;
 
@@ -3138,9 +3155,10 @@ declarations = (((void *)0));
 }
 if(skipNoHead || declarations)
 {
-if(external && external->declaration)
+if(spec)
 {
-((struct Specifier *)(*external->declaration->specifiers).first)->definitions = declarations;
+if(declarations)
+spec->definitions = declarations;
 if(curExternal && curExternal->symbol && curExternal->symbol->idCode < classSym->id)
 {
 if(classSym->structExternal)
@@ -4863,7 +4881,7 @@ struct Conversion * after = (conversions != (((void *)0))) ? conversions->last :
 
 if(!convert->dataType)
 convert->dataType = ProcessTypeString(convert->dataTypeString, 0x0);
-if(MatchTypes(convert->dataType, dest, conversions, (((void *)0)), (((void *)0)), 0x0, 0x1, 0x0, 0x1))
+if((!isConversionExploration || convert->dataType->kind == 8 || !strcmp(_class->name, "String")) && MatchTypes(convert->dataType, dest, conversions, (((void *)0)), (((void *)0)), (convert->dataType->kind == 8 && !strcmp(convert->dataTypeString, "String")) ? 0x1 : 0x0, convert->dataType->kind == 8, 0x0, 0x1))
 {
 if(!conversions && !convert->Get)
 return 0x1;
@@ -4924,7 +4942,7 @@ if(!dest->_class->registered->dataType)
 dest->_class->registered->dataType = ProcessTypeString(dest->_class->registered->dataTypeString, 0x0);
 if(dest->_class->registered->dataType->kind == 8 || source->truth || dest->truth)
 {
-if(MatchTypes(source, dest->_class->registered->dataType, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0))
+if(MatchTypes(source, dest->_class->registered->dataType, conversions, (((void *)0)), (((void *)0)), 0x1, dest->_class->registered->dataType->kind == 8, 0x0, 0x0))
 {
 return 0x1;
 }
@@ -4947,7 +4965,7 @@ struct Conversion * after = (conversions != (((void *)0))) ? conversions->last :
 
 if(!convert->dataType)
 convert->dataType = ProcessTypeString(convert->dataTypeString, 0x0);
-if(convert->dataType != source && MatchTypes(convert->dataType, dest, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x1))
+if(convert->dataType != source && (!isConversionExploration || convert->dataType->kind == 8 || !strcmp(_class->name, "String")) && MatchTypes(convert->dataType, dest, conversions, (((void *)0)), (((void *)0)), convert->dataType->kind == 8, convert->dataType->kind == 8, 0x0, 0x1))
 {
 if(!conversions && !convert->Get)
 return 0x1;
@@ -4971,8 +4989,11 @@ if(enumBaseType && source->_class && source->_class->registered && source->_clas
 {
 if(!source->_class->registered->dataType)
 source->_class->registered->dataType = ProcessTypeString(source->_class->registered->dataTypeString, 0x0);
-if(MatchTypes(source->_class->registered->dataType, dest, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0))
+if(!isConversionExploration || source->_class->registered->dataType->kind == 8 || !strcmp(source->_class->registered->name, "String"))
 {
+if(MatchTypes(source->_class->registered->dataType, dest, conversions, (((void *)0)), (((void *)0)), source->_class->registered->dataType->kind == 8, source->_class->registered->dataType->kind == 8, 0x0, 0x0))
+return 0x1;
+else if(MatchTypes(dest, source->_class->registered->dataType, (((void *)0)), (((void *)0)), (((void *)0)), 0x0, 0x0, 0x0, 0x0))
 return 0x1;
 }
 }
@@ -4996,7 +5017,7 @@ else if(dest->kind == 23 && (source->kind == 2 || source->kind == 1 || source->k
 return 0x1;
 else if(source->kind == 15 && (dest->kind == 3 || dest->kind == 2 || dest->kind == 1 || source->kind == 24 || dest->kind == 5 || dest->kind == 4 || dest->kind == 22 || dest->kind == 23))
 return 0x1;
-else if(dest->kind == 15 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 5 || source->kind == 4 || source->kind == 22 || source->kind == 23))
+else if(dest->kind == 15 && !isConversionExploration && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 5 || source->kind == 4 || source->kind == 22 || source->kind == 23))
 return 0x1;
 else if((dest->kind == 11 || (dest->kind == 13 && dest->type->kind == 11) || dest->kind == 16) && ((source->kind == 11 || (source->kind == 13 && source->type->kind == 11) || source->kind == 16)))
 {
@@ -5349,6 +5370,8 @@ return 0x1;
 return 0x0;
 }
 
+extern struct Expression * CopyExpression(struct Expression * exp);
+
 extern unsigned long strtoul(const char *  nptr, char * *  endptr, int base);
 
 void ReadString(char *  output, char *  string);
@@ -5361,12 +5384,28 @@ extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__Ol
 
 unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla)
 {
-struct Type * source = sourceExp->expType;
+struct Type * source;
 struct Type * realDest = dest;
 struct Type * backupSourceExpType = (((void *)0));
+struct Expression * computedExp = sourceExp;
 
+dest->refCount++;
+if(sourceExp->isConstant && sourceExp->type != 2 && sourceExp->type != 0 && sourceExp->type != 11 && dest->kind == 8 && dest->_class && dest->_class->registered && dest->_class->registered->type == 4)
+{
+computedExp = CopyExpression(sourceExp);
+ComputeExpression(computedExp);
+}
+source = sourceExp->expType;
 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->constant, (((void *)0)), 0))
+{
+if(computedExp != sourceExp)
+{
+FreeExpression(computedExp);
+computedExp = sourceExp;
+}
+FreeType(dest);
 return 0x1;
+}
 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
 {
 if(source->_class && source->_class->registered && source->_class->registered->type == 3)
@@ -5378,9 +5417,17 @@ for(sourceBase = source->_class->registered; sourceBase && sourceBase->base && s
 for(destBase = dest->_class->registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
 ;
 if(sourceBase == destBase)
+{
+if(computedExp != sourceExp)
+{
+FreeExpression(computedExp);
+computedExp = sourceExp;
+}
+FreeType(dest);
 return 0x1;
 }
 }
+}
 if(source)
 {
 struct __ecereNameSpace__ecere__sys__OldList * specs;
@@ -5388,20 +5435,24 @@ unsigned int flag = 0x0;
 long long value = (((int)0x7fffffff));
 
 source->refCount++;
-dest->refCount++;
-if(sourceExp->type == 2)
+if(computedExp->type == 2)
 {
 if(source->isSigned)
-value = strtoll(sourceExp->constant, (((void *)0)), 0);
+value = strtoll(computedExp->constant, (((void *)0)), 0);
 else
-value = strtoull(sourceExp->constant, (((void *)0)), 0);
+value = strtoull(computedExp->constant, (((void *)0)), 0);
 }
-else if(sourceExp->type == 4 && sourceExp->op.op == '-' && !sourceExp->op.exp1 && sourceExp->op.exp2 && sourceExp->op.exp2->type == 2)
+else if(computedExp->type == 4 && sourceExp->op.op == '-' && !computedExp->op.exp1 && computedExp->op.exp2 && computedExp->op.exp2->type == 2)
 {
 if(source->isSigned)
-value = -strtoll(sourceExp->op.exp2->constant, (((void *)0)), 0);
+value = -strtoll(computedExp->op.exp2->constant, (((void *)0)), 0);
 else
-value = -strtoull(sourceExp->op.exp2->constant, (((void *)0)), 0);
+value = -strtoull(computedExp->op.exp2->constant, (((void *)0)), 0);
+}
+if(computedExp != sourceExp)
+{
+FreeExpression(computedExp);
+computedExp = sourceExp;
 }
 if(dest->kind != 8 && source->kind == 8 && source->_class && source->_class->registered && !strcmp(source->_class->registered->fullName, "ecere::com::unichar"))
 {
@@ -5479,7 +5530,7 @@ else if(source->kind == 8)
 {
 struct __ecereNameSpace__ecere__com__Class * _class = source->_class ? source->_class->registered : (((void *)0));
 
-if(_class && (_class->type == 3 || !strcmp(_class->fullName, "bool") || _class->type == 2))
+if(_class && (_class->type == 3 || _class->type == 2))
 {
 if(dest->kind != 8)
 {
@@ -5539,8 +5590,17 @@ return 0x1;
 if(dest->kind == 8)
 {
 struct __ecereNameSpace__ecere__com__Class * _class = dest->_class ? dest->_class->registered : (((void *)0));
+unsigned int fittingValue = 0x0;
+
+if(_class && _class->type == 4)
+{
+struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
+struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
 
-if(_class && !dest->truth && (_class->type == 3 || !strcmp(_class->fullName, "bool") || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
+if(c && value >= 0 && value <= c->largest)
+fittingValue = 0x1;
+}
+if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
 {
 if(_class->type == 0 || _class->type == 5)
 {
@@ -5681,7 +5741,7 @@ sourceExp->expType = backupSourceExpType;
 }
 return 0x0;
 }
-if(!flag)
+if(!flag && !sourceExp->opDestType)
 {
 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
 
@@ -5720,6 +5780,11 @@ return 0x1;
 }
 else
 {
+if(computedExp != sourceExp)
+{
+FreeExpression(computedExp);
+computedExp = sourceExp;
+}
 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->list)
 sourceExp = (*sourceExp->list).last;
 if(sourceExp->type == 0)
@@ -5761,6 +5826,7 @@ else
 sprintf(constant, "0x%X", (int)value->data);
 sourceExp->constant = __ecereNameSpace__ecere__sys__CopyString(constant);
 }
+FreeType(dest);
 return 0x1;
 }
 }
@@ -5768,9 +5834,13 @@ return 0x1;
 }
 }
 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
+{
+FreeType(dest);
 return 0x1;
 }
 }
+FreeType(dest);
+}
 return 0x0;
 }
 
@@ -5779,7 +5849,7 @@ static unsigned int IntAdd(struct Expression * exp, struct Operand * op1, struct
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i + value2);
+exp->string = PrintInt((op1->i + value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -5794,7 +5864,7 @@ static unsigned int UIntAdd(struct Expression * exp, struct Operand * op1, struc
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui + value2);
+exp->string = PrintUInt((op1->ui + value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -5809,7 +5879,7 @@ static unsigned int Int64Add(struct Expression * exp, struct Operand * op1, stru
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 + value2);
+exp->string = PrintInt64((op1->i64 + value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -5824,7 +5894,7 @@ static unsigned int UInt64Add(struct Expression * exp, struct Operand * op1, str
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 + value2);
+exp->string = PrintUInt64((op1->ui64 + value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -5839,7 +5909,7 @@ static unsigned int ShortAdd(struct Expression * exp, struct Operand * op1, stru
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s + value2);
+exp->string = PrintShort((op1->s + value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -5854,7 +5924,7 @@ static unsigned int UShortAdd(struct Expression * exp, struct Operand * op1, str
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us + value2);
+exp->string = PrintUShort((op1->us + value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -5869,7 +5939,7 @@ static unsigned int CharAdd(struct Expression * exp, struct Operand * op1, struc
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c + value2);
+exp->string = PrintChar((op1->c + value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -5884,7 +5954,7 @@ static unsigned int UCharAdd(struct Expression * exp, struct Operand * op1, stru
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc + value2);
+exp->string = PrintUChar((op1->uc + value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -5899,7 +5969,7 @@ static unsigned int FloatAdd(struct Expression * exp, struct Operand * op1, stru
 float value2 = op2->f;
 
 exp->type = 2;
-exp->string = PrintFloat(op1->f + value2);
+exp->string = PrintFloat((float)(op1->f + value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -5914,7 +5984,7 @@ static unsigned int DoubleAdd(struct Expression * exp, struct Operand * op1, str
 double value2 = op2->d;
 
 exp->type = 2;
-exp->string = PrintDouble(op1->d + value2);
+exp->string = PrintDouble((double)(op1->d + value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -5929,7 +5999,7 @@ static unsigned int IntSub(struct Expression * exp, struct Operand * op1, struct
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i - value2);
+exp->string = PrintInt((op1->i - value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -5944,7 +6014,7 @@ static unsigned int UIntSub(struct Expression * exp, struct Operand * op1, struc
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui - value2);
+exp->string = PrintUInt((op1->ui - value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -5959,7 +6029,7 @@ static unsigned int Int64Sub(struct Expression * exp, struct Operand * op1, stru
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 - value2);
+exp->string = PrintInt64((op1->i64 - value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -5974,7 +6044,7 @@ static unsigned int UInt64Sub(struct Expression * exp, struct Operand * op1, str
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 - value2);
+exp->string = PrintUInt64((op1->ui64 - value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -5989,7 +6059,7 @@ static unsigned int ShortSub(struct Expression * exp, struct Operand * op1, stru
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s - value2);
+exp->string = PrintShort((op1->s - value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6004,7 +6074,7 @@ static unsigned int UShortSub(struct Expression * exp, struct Operand * op1, str
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us - value2);
+exp->string = PrintUShort((op1->us - value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6019,7 +6089,7 @@ static unsigned int CharSub(struct Expression * exp, struct Operand * op1, struc
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c - value2);
+exp->string = PrintChar((op1->c - value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6034,7 +6104,7 @@ static unsigned int UCharSub(struct Expression * exp, struct Operand * op1, stru
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc - value2);
+exp->string = PrintUChar((op1->uc - value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6049,7 +6119,7 @@ static unsigned int FloatSub(struct Expression * exp, struct Operand * op1, stru
 float value2 = op2->f;
 
 exp->type = 2;
-exp->string = PrintFloat(op1->f - value2);
+exp->string = PrintFloat((float)(op1->f - value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6064,7 +6134,7 @@ static unsigned int DoubleSub(struct Expression * exp, struct Operand * op1, str
 double value2 = op2->d;
 
 exp->type = 2;
-exp->string = PrintDouble(op1->d - value2);
+exp->string = PrintDouble((double)(op1->d - value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6079,7 +6149,7 @@ static unsigned int IntMul(struct Expression * exp, struct Operand * op1, struct
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i * value2);
+exp->string = PrintInt((op1->i * value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6094,7 +6164,7 @@ static unsigned int UIntMul(struct Expression * exp, struct Operand * op1, struc
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui * value2);
+exp->string = PrintUInt((op1->ui * value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6109,7 +6179,7 @@ static unsigned int Int64Mul(struct Expression * exp, struct Operand * op1, stru
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 * value2);
+exp->string = PrintInt64((op1->i64 * value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6124,7 +6194,7 @@ static unsigned int UInt64Mul(struct Expression * exp, struct Operand * op1, str
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 * value2);
+exp->string = PrintUInt64((op1->ui64 * value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6139,7 +6209,7 @@ static unsigned int ShortMul(struct Expression * exp, struct Operand * op1, stru
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s * value2);
+exp->string = PrintShort((op1->s * value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6154,7 +6224,7 @@ static unsigned int UShortMul(struct Expression * exp, struct Operand * op1, str
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us * value2);
+exp->string = PrintUShort((op1->us * value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6169,7 +6239,7 @@ static unsigned int CharMul(struct Expression * exp, struct Operand * op1, struc
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c * value2);
+exp->string = PrintChar((op1->c * value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6184,7 +6254,7 @@ static unsigned int UCharMul(struct Expression * exp, struct Operand * op1, stru
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc * value2);
+exp->string = PrintUChar((op1->uc * value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6199,7 +6269,7 @@ static unsigned int FloatMul(struct Expression * exp, struct Operand * op1, stru
 float value2 = op2->f;
 
 exp->type = 2;
-exp->string = PrintFloat(op1->f * value2);
+exp->string = PrintFloat((float)(op1->f * value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6214,7 +6284,7 @@ static unsigned int DoubleMul(struct Expression * exp, struct Operand * op1, str
 double value2 = op2->d;
 
 exp->type = 2;
-exp->string = PrintDouble(op1->d * value2);
+exp->string = PrintDouble((double)(op1->d * value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6889,7 +6959,7 @@ static unsigned int IntAsign(struct Expression * exp, struct Operand * op1, stru
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i = value2);
+exp->string = PrintInt((op1->i = value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6904,7 +6974,7 @@ static unsigned int UIntAsign(struct Expression * exp, struct Operand * op1, str
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui = value2);
+exp->string = PrintUInt((op1->ui = value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6919,7 +6989,7 @@ static unsigned int Int64Asign(struct Expression * exp, struct Operand * op1, st
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 = value2);
+exp->string = PrintInt64((op1->i64 = value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6934,7 +7004,7 @@ static unsigned int UInt64Asign(struct Expression * exp, struct Operand * op1, s
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 = value2);
+exp->string = PrintUInt64((op1->ui64 = value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6949,7 +7019,7 @@ static unsigned int ShortAsign(struct Expression * exp, struct Operand * op1, st
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s = value2);
+exp->string = PrintShort((op1->s = value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6964,7 +7034,7 @@ static unsigned int UShortAsign(struct Expression * exp, struct Operand * op1, s
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us = value2);
+exp->string = PrintUShort((op1->us = value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6979,7 +7049,7 @@ static unsigned int CharAsign(struct Expression * exp, struct Operand * op1, str
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c = value2);
+exp->string = PrintChar((op1->c = value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -6994,7 +7064,7 @@ static unsigned int UCharAsign(struct Expression * exp, struct Operand * op1, st
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc = value2);
+exp->string = PrintUChar((op1->uc = value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7009,7 +7079,7 @@ static unsigned int FloatAsign(struct Expression * exp, struct Operand * op1, st
 float value2 = op2->f;
 
 exp->type = 2;
-exp->string = PrintFloat(op1->f = value2);
+exp->string = PrintFloat((float)(op1->f = value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7024,7 +7094,7 @@ static unsigned int DoubleAsign(struct Expression * exp, struct Operand * op1, s
 double value2 = op2->d;
 
 exp->type = 2;
-exp->string = PrintDouble(op1->d = value2);
+exp->string = PrintDouble((double)(op1->d = value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7039,7 +7109,7 @@ static unsigned int IntAddAsign(struct Expression * exp, struct Operand * op1, s
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i += value2);
+exp->string = PrintInt((op1->i += value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7054,7 +7124,7 @@ static unsigned int UIntAddAsign(struct Expression * exp, struct Operand * op1,
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui += value2);
+exp->string = PrintUInt((op1->ui += value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7069,7 +7139,7 @@ static unsigned int Int64AddAsign(struct Expression * exp, struct Operand * op1,
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 += value2);
+exp->string = PrintInt64((op1->i64 += value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7084,7 +7154,7 @@ static unsigned int UInt64AddAsign(struct Expression * exp, struct Operand * op1
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 += value2);
+exp->string = PrintUInt64((op1->ui64 += value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7099,7 +7169,7 @@ static unsigned int ShortAddAsign(struct Expression * exp, struct Operand * op1,
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s += value2);
+exp->string = PrintShort((op1->s += value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7114,7 +7184,7 @@ static unsigned int UShortAddAsign(struct Expression * exp, struct Operand * op1
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us += value2);
+exp->string = PrintUShort((op1->us += value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7129,7 +7199,7 @@ static unsigned int CharAddAsign(struct Expression * exp, struct Operand * op1,
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c += value2);
+exp->string = PrintChar((op1->c += value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7144,7 +7214,7 @@ static unsigned int UCharAddAsign(struct Expression * exp, struct Operand * op1,
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc += value2);
+exp->string = PrintUChar((op1->uc += value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7159,7 +7229,7 @@ static unsigned int FloatAddAsign(struct Expression * exp, struct Operand * op1,
 float value2 = op2->f;
 
 exp->type = 2;
-exp->string = PrintFloat(op1->f += value2);
+exp->string = PrintFloat((float)(op1->f += value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7174,7 +7244,7 @@ static unsigned int DoubleAddAsign(struct Expression * exp, struct Operand * op1
 double value2 = op2->d;
 
 exp->type = 2;
-exp->string = PrintDouble(op1->d += value2);
+exp->string = PrintDouble((double)(op1->d += value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7189,7 +7259,7 @@ static unsigned int IntSubAsign(struct Expression * exp, struct Operand * op1, s
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i -= value2);
+exp->string = PrintInt((op1->i -= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7204,7 +7274,7 @@ static unsigned int UIntSubAsign(struct Expression * exp, struct Operand * op1,
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui -= value2);
+exp->string = PrintUInt((op1->ui -= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7219,7 +7289,7 @@ static unsigned int Int64SubAsign(struct Expression * exp, struct Operand * op1,
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 -= value2);
+exp->string = PrintInt64((op1->i64 -= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7234,7 +7304,7 @@ static unsigned int UInt64SubAsign(struct Expression * exp, struct Operand * op1
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 -= value2);
+exp->string = PrintUInt64((op1->ui64 -= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7249,7 +7319,7 @@ static unsigned int ShortSubAsign(struct Expression * exp, struct Operand * op1,
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s -= value2);
+exp->string = PrintShort((op1->s -= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7264,7 +7334,7 @@ static unsigned int UShortSubAsign(struct Expression * exp, struct Operand * op1
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us -= value2);
+exp->string = PrintUShort((op1->us -= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7279,7 +7349,7 @@ static unsigned int CharSubAsign(struct Expression * exp, struct Operand * op1,
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c -= value2);
+exp->string = PrintChar((op1->c -= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7294,7 +7364,7 @@ static unsigned int UCharSubAsign(struct Expression * exp, struct Operand * op1,
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc -= value2);
+exp->string = PrintUChar((op1->uc -= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7309,7 +7379,7 @@ static unsigned int FloatSubAsign(struct Expression * exp, struct Operand * op1,
 float value2 = op2->f;
 
 exp->type = 2;
-exp->string = PrintFloat(op1->f -= value2);
+exp->string = PrintFloat((float)(op1->f -= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7324,7 +7394,7 @@ static unsigned int DoubleSubAsign(struct Expression * exp, struct Operand * op1
 double value2 = op2->d;
 
 exp->type = 2;
-exp->string = PrintDouble(op1->d -= value2);
+exp->string = PrintDouble((double)(op1->d -= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7339,7 +7409,7 @@ static unsigned int IntMulAsign(struct Expression * exp, struct Operand * op1, s
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i *= value2);
+exp->string = PrintInt((op1->i *= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7354,7 +7424,7 @@ static unsigned int UIntMulAsign(struct Expression * exp, struct Operand * op1,
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui *= value2);
+exp->string = PrintUInt((op1->ui *= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7369,7 +7439,7 @@ static unsigned int Int64MulAsign(struct Expression * exp, struct Operand * op1,
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 *= value2);
+exp->string = PrintInt64((op1->i64 *= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7384,7 +7454,7 @@ static unsigned int UInt64MulAsign(struct Expression * exp, struct Operand * op1
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 *= value2);
+exp->string = PrintUInt64((op1->ui64 *= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7399,7 +7469,7 @@ static unsigned int ShortMulAsign(struct Expression * exp, struct Operand * op1,
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s *= value2);
+exp->string = PrintShort((op1->s *= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7414,7 +7484,7 @@ static unsigned int UShortMulAsign(struct Expression * exp, struct Operand * op1
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us *= value2);
+exp->string = PrintUShort((op1->us *= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7429,7 +7499,7 @@ static unsigned int CharMulAsign(struct Expression * exp, struct Operand * op1,
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c *= value2);
+exp->string = PrintChar((op1->c *= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7444,7 +7514,7 @@ static unsigned int UCharMulAsign(struct Expression * exp, struct Operand * op1,
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc *= value2);
+exp->string = PrintUChar((op1->uc *= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7459,7 +7529,7 @@ static unsigned int FloatMulAsign(struct Expression * exp, struct Operand * op1,
 float value2 = op2->f;
 
 exp->type = 2;
-exp->string = PrintFloat(op1->f *= value2);
+exp->string = PrintFloat((float)(op1->f *= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7474,7 +7544,7 @@ static unsigned int DoubleMulAsign(struct Expression * exp, struct Operand * op1
 double value2 = op2->d;
 
 exp->type = 2;
-exp->string = PrintDouble(op1->d *= value2);
+exp->string = PrintDouble((double)(op1->d *= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7759,7 +7829,7 @@ static unsigned int IntBitAnd(struct Expression * exp, struct Operand * op1, str
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i & value2);
+exp->string = PrintInt((op1->i & value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7774,7 +7844,7 @@ static unsigned int UIntBitAnd(struct Expression * exp, struct Operand * op1, st
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui & value2);
+exp->string = PrintUInt((op1->ui & value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7789,7 +7859,7 @@ static unsigned int Int64BitAnd(struct Expression * exp, struct Operand * op1, s
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 & value2);
+exp->string = PrintInt64((op1->i64 & value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7804,7 +7874,7 @@ static unsigned int UInt64BitAnd(struct Expression * exp, struct Operand * op1,
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 & value2);
+exp->string = PrintUInt64((op1->ui64 & value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7819,7 +7889,7 @@ static unsigned int ShortBitAnd(struct Expression * exp, struct Operand * op1, s
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s & value2);
+exp->string = PrintShort((op1->s & value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7834,7 +7904,7 @@ static unsigned int UShortBitAnd(struct Expression * exp, struct Operand * op1,
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us & value2);
+exp->string = PrintUShort((op1->us & value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7849,7 +7919,7 @@ static unsigned int CharBitAnd(struct Expression * exp, struct Operand * op1, st
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c & value2);
+exp->string = PrintChar((op1->c & value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7864,7 +7934,7 @@ static unsigned int UCharBitAnd(struct Expression * exp, struct Operand * op1, s
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc & value2);
+exp->string = PrintUChar((op1->uc & value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7879,7 +7949,7 @@ static unsigned int IntBitOr(struct Expression * exp, struct Operand * op1, stru
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i | value2);
+exp->string = PrintInt((op1->i | value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7894,7 +7964,7 @@ static unsigned int UIntBitOr(struct Expression * exp, struct Operand * op1, str
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui | value2);
+exp->string = PrintUInt((op1->ui | value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7909,7 +7979,7 @@ static unsigned int Int64BitOr(struct Expression * exp, struct Operand * op1, st
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 | value2);
+exp->string = PrintInt64((op1->i64 | value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7924,7 +7994,7 @@ static unsigned int UInt64BitOr(struct Expression * exp, struct Operand * op1, s
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 | value2);
+exp->string = PrintUInt64((op1->ui64 | value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7939,7 +8009,7 @@ static unsigned int ShortBitOr(struct Expression * exp, struct Operand * op1, st
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s | value2);
+exp->string = PrintShort((op1->s | value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7954,7 +8024,7 @@ static unsigned int UShortBitOr(struct Expression * exp, struct Operand * op1, s
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us | value2);
+exp->string = PrintUShort((op1->us | value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7969,7 +8039,7 @@ static unsigned int CharBitOr(struct Expression * exp, struct Operand * op1, str
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c | value2);
+exp->string = PrintChar((op1->c | value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7984,7 +8054,7 @@ static unsigned int UCharBitOr(struct Expression * exp, struct Operand * op1, st
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc | value2);
+exp->string = PrintUChar((op1->uc | value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -7999,7 +8069,7 @@ static unsigned int IntBitXor(struct Expression * exp, struct Operand * op1, str
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i ^ value2);
+exp->string = PrintInt((op1->i ^ value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8014,7 +8084,7 @@ static unsigned int UIntBitXor(struct Expression * exp, struct Operand * op1, st
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui ^ value2);
+exp->string = PrintUInt((op1->ui ^ value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8029,7 +8099,7 @@ static unsigned int Int64BitXor(struct Expression * exp, struct Operand * op1, s
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 ^ value2);
+exp->string = PrintInt64((op1->i64 ^ value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8044,7 +8114,7 @@ static unsigned int UInt64BitXor(struct Expression * exp, struct Operand * op1,
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 ^ value2);
+exp->string = PrintUInt64((op1->ui64 ^ value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8059,7 +8129,7 @@ static unsigned int ShortBitXor(struct Expression * exp, struct Operand * op1, s
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s ^ value2);
+exp->string = PrintShort((op1->s ^ value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8074,7 +8144,7 @@ static unsigned int UShortBitXor(struct Expression * exp, struct Operand * op1,
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us ^ value2);
+exp->string = PrintUShort((op1->us ^ value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8089,7 +8159,7 @@ static unsigned int CharBitXor(struct Expression * exp, struct Operand * op1, st
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c ^ value2);
+exp->string = PrintChar((op1->c ^ value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8104,7 +8174,7 @@ static unsigned int UCharBitXor(struct Expression * exp, struct Operand * op1, s
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc ^ value2);
+exp->string = PrintUChar((op1->uc ^ value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8119,7 +8189,7 @@ static unsigned int IntLShift(struct Expression * exp, struct Operand * op1, str
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i << value2);
+exp->string = PrintInt((op1->i << value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8134,7 +8204,7 @@ static unsigned int UIntLShift(struct Expression * exp, struct Operand * op1, st
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui << value2);
+exp->string = PrintUInt((op1->ui << value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8149,7 +8219,7 @@ static unsigned int Int64LShift(struct Expression * exp, struct Operand * op1, s
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 << value2);
+exp->string = PrintInt64((op1->i64 << value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8164,7 +8234,7 @@ static unsigned int UInt64LShift(struct Expression * exp, struct Operand * op1,
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 << value2);
+exp->string = PrintUInt64((op1->ui64 << value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8179,7 +8249,7 @@ static unsigned int ShortLShift(struct Expression * exp, struct Operand * op1, s
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s << value2);
+exp->string = PrintShort((op1->s << value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8194,7 +8264,7 @@ static unsigned int UShortLShift(struct Expression * exp, struct Operand * op1,
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us << value2);
+exp->string = PrintUShort((op1->us << value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8209,7 +8279,7 @@ static unsigned int CharLShift(struct Expression * exp, struct Operand * op1, st
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c << value2);
+exp->string = PrintChar((op1->c << value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8224,7 +8294,7 @@ static unsigned int UCharLShift(struct Expression * exp, struct Operand * op1, s
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc << value2);
+exp->string = PrintUChar((op1->uc << value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8239,7 +8309,7 @@ static unsigned int IntRShift(struct Expression * exp, struct Operand * op1, str
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i >> value2);
+exp->string = PrintInt((op1->i >> value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8254,7 +8324,7 @@ static unsigned int UIntRShift(struct Expression * exp, struct Operand * op1, st
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui >> value2);
+exp->string = PrintUInt((op1->ui >> value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8269,7 +8339,7 @@ static unsigned int Int64RShift(struct Expression * exp, struct Operand * op1, s
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 >> value2);
+exp->string = PrintInt64((op1->i64 >> value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8284,7 +8354,7 @@ static unsigned int UInt64RShift(struct Expression * exp, struct Operand * op1,
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 >> value2);
+exp->string = PrintUInt64((op1->ui64 >> value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8299,7 +8369,7 @@ static unsigned int ShortRShift(struct Expression * exp, struct Operand * op1, s
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s >> value2);
+exp->string = PrintShort((op1->s >> value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8314,7 +8384,7 @@ static unsigned int UShortRShift(struct Expression * exp, struct Operand * op1,
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us >> value2);
+exp->string = PrintUShort((op1->us >> value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8329,7 +8399,7 @@ static unsigned int CharRShift(struct Expression * exp, struct Operand * op1, st
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c >> value2);
+exp->string = PrintChar((op1->c >> value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8344,7 +8414,7 @@ static unsigned int UCharRShift(struct Expression * exp, struct Operand * op1, s
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc >> value2);
+exp->string = PrintUChar((op1->uc >> value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8463,7 +8533,7 @@ static unsigned int IntAndAsign(struct Expression * exp, struct Operand * op1, s
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i &= value2);
+exp->string = PrintInt((op1->i &= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8478,7 +8548,7 @@ static unsigned int UIntAndAsign(struct Expression * exp, struct Operand * op1,
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui &= value2);
+exp->string = PrintUInt((op1->ui &= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8493,7 +8563,7 @@ static unsigned int Int64AndAsign(struct Expression * exp, struct Operand * op1,
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 &= value2);
+exp->string = PrintInt64((op1->i64 &= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8508,7 +8578,7 @@ static unsigned int UInt64AndAsign(struct Expression * exp, struct Operand * op1
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 &= value2);
+exp->string = PrintUInt64((op1->ui64 &= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8523,7 +8593,7 @@ static unsigned int ShortAndAsign(struct Expression * exp, struct Operand * op1,
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s &= value2);
+exp->string = PrintShort((op1->s &= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8538,7 +8608,7 @@ static unsigned int UShortAndAsign(struct Expression * exp, struct Operand * op1
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us &= value2);
+exp->string = PrintUShort((op1->us &= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8553,7 +8623,7 @@ static unsigned int CharAndAsign(struct Expression * exp, struct Operand * op1,
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c &= value2);
+exp->string = PrintChar((op1->c &= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8568,7 +8638,7 @@ static unsigned int UCharAndAsign(struct Expression * exp, struct Operand * op1,
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc &= value2);
+exp->string = PrintUChar((op1->uc &= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8583,7 +8653,7 @@ static unsigned int IntOrAsign(struct Expression * exp, struct Operand * op1, st
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i |= value2);
+exp->string = PrintInt((op1->i |= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8598,7 +8668,7 @@ static unsigned int UIntOrAsign(struct Expression * exp, struct Operand * op1, s
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui |= value2);
+exp->string = PrintUInt((op1->ui |= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8613,7 +8683,7 @@ static unsigned int Int64OrAsign(struct Expression * exp, struct Operand * op1,
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 |= value2);
+exp->string = PrintInt64((op1->i64 |= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8628,7 +8698,7 @@ static unsigned int UInt64OrAsign(struct Expression * exp, struct Operand * op1,
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 |= value2);
+exp->string = PrintUInt64((op1->ui64 |= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8643,7 +8713,7 @@ static unsigned int ShortOrAsign(struct Expression * exp, struct Operand * op1,
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s |= value2);
+exp->string = PrintShort((op1->s |= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8658,7 +8728,7 @@ static unsigned int UShortOrAsign(struct Expression * exp, struct Operand * op1,
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us |= value2);
+exp->string = PrintUShort((op1->us |= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8673,7 +8743,7 @@ static unsigned int CharOrAsign(struct Expression * exp, struct Operand * op1, s
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c |= value2);
+exp->string = PrintChar((op1->c |= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8688,7 +8758,7 @@ static unsigned int UCharOrAsign(struct Expression * exp, struct Operand * op1,
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc |= value2);
+exp->string = PrintUChar((op1->uc |= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8703,7 +8773,7 @@ static unsigned int IntXorAsign(struct Expression * exp, struct Operand * op1, s
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i ^= value2);
+exp->string = PrintInt((op1->i ^= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8718,7 +8788,7 @@ static unsigned int UIntXorAsign(struct Expression * exp, struct Operand * op1,
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui ^= value2);
+exp->string = PrintUInt((op1->ui ^= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8733,7 +8803,7 @@ static unsigned int Int64XorAsign(struct Expression * exp, struct Operand * op1,
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 ^= value2);
+exp->string = PrintInt64((op1->i64 ^= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8748,7 +8818,7 @@ static unsigned int UInt64XorAsign(struct Expression * exp, struct Operand * op1
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 ^= value2);
+exp->string = PrintUInt64((op1->ui64 ^= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8763,7 +8833,7 @@ static unsigned int ShortXorAsign(struct Expression * exp, struct Operand * op1,
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s ^= value2);
+exp->string = PrintShort((op1->s ^= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8778,7 +8848,7 @@ static unsigned int UShortXorAsign(struct Expression * exp, struct Operand * op1
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us ^= value2);
+exp->string = PrintUShort((op1->us ^= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8793,7 +8863,7 @@ static unsigned int CharXorAsign(struct Expression * exp, struct Operand * op1,
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c ^= value2);
+exp->string = PrintChar((op1->c ^= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8808,7 +8878,7 @@ static unsigned int UCharXorAsign(struct Expression * exp, struct Operand * op1,
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc ^= value2);
+exp->string = PrintUChar((op1->uc ^= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8823,7 +8893,7 @@ static unsigned int IntLShiftAsign(struct Expression * exp, struct Operand * op1
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i <<= value2);
+exp->string = PrintInt((op1->i <<= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8838,7 +8908,7 @@ static unsigned int UIntLShiftAsign(struct Expression * exp, struct Operand * op
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui <<= value2);
+exp->string = PrintUInt((op1->ui <<= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8853,7 +8923,7 @@ static unsigned int Int64LShiftAsign(struct Expression * exp, struct Operand * o
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 <<= value2);
+exp->string = PrintInt64((op1->i64 <<= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8868,7 +8938,7 @@ static unsigned int UInt64LShiftAsign(struct Expression * exp, struct Operand *
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 <<= value2);
+exp->string = PrintUInt64((op1->ui64 <<= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8883,7 +8953,7 @@ static unsigned int ShortLShiftAsign(struct Expression * exp, struct Operand * o
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s <<= value2);
+exp->string = PrintShort((op1->s <<= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8898,7 +8968,7 @@ static unsigned int UShortLShiftAsign(struct Expression * exp, struct Operand *
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us <<= value2);
+exp->string = PrintUShort((op1->us <<= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8913,7 +8983,7 @@ static unsigned int CharLShiftAsign(struct Expression * exp, struct Operand * op
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c <<= value2);
+exp->string = PrintChar((op1->c <<= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8928,7 +8998,7 @@ static unsigned int UCharLShiftAsign(struct Expression * exp, struct Operand * o
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc <<= value2);
+exp->string = PrintUChar((op1->uc <<= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8943,7 +9013,7 @@ static unsigned int IntRShiftAsign(struct Expression * exp, struct Operand * op1
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i >>= value2);
+exp->string = PrintInt((op1->i >>= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8958,7 +9028,7 @@ static unsigned int UIntRShiftAsign(struct Expression * exp, struct Operand * op
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui >>= value2);
+exp->string = PrintUInt((op1->ui >>= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8973,7 +9043,7 @@ static unsigned int Int64RShiftAsign(struct Expression * exp, struct Operand * o
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 >>= value2);
+exp->string = PrintInt64((op1->i64 >>= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -8988,7 +9058,7 @@ static unsigned int UInt64RShiftAsign(struct Expression * exp, struct Operand *
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 >>= value2);
+exp->string = PrintUInt64((op1->ui64 >>= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9003,7 +9073,7 @@ static unsigned int ShortRShiftAsign(struct Expression * exp, struct Operand * o
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s >>= value2);
+exp->string = PrintShort((op1->s >>= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9018,7 +9088,7 @@ static unsigned int UShortRShiftAsign(struct Expression * exp, struct Operand *
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us >>= value2);
+exp->string = PrintUShort((op1->us >>= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9033,7 +9103,7 @@ static unsigned int CharRShiftAsign(struct Expression * exp, struct Operand * op
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c >>= value2);
+exp->string = PrintChar((op1->c >>= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9048,7 +9118,7 @@ static unsigned int UCharRShiftAsign(struct Expression * exp, struct Operand * o
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc >>= value2);
+exp->string = PrintUChar((op1->uc >>= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9167,7 +9237,7 @@ static unsigned int IntEqu(struct Expression * exp, struct Operand * op1, struct
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i == value2);
+exp->string = PrintInt((int)(op1->i == value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9182,7 +9252,7 @@ static unsigned int UIntEqu(struct Expression * exp, struct Operand * op1, struc
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui == value2);
+exp->string = PrintUInt((unsigned int)(op1->ui == value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9197,7 +9267,7 @@ static unsigned int Int64Equ(struct Expression * exp, struct Operand * op1, stru
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 == value2);
+exp->string = PrintInt64((long long)(op1->i64 == value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9212,7 +9282,7 @@ static unsigned int UInt64Equ(struct Expression * exp, struct Operand * op1, str
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 == value2);
+exp->string = PrintUInt64((uint64)(op1->ui64 == value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9227,7 +9297,7 @@ static unsigned int ShortEqu(struct Expression * exp, struct Operand * op1, stru
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s == value2);
+exp->string = PrintShort((short)(op1->s == value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9242,7 +9312,7 @@ static unsigned int UShortEqu(struct Expression * exp, struct Operand * op1, str
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us == value2);
+exp->string = PrintUShort((unsigned short)(op1->us == value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9257,7 +9327,7 @@ static unsigned int CharEqu(struct Expression * exp, struct Operand * op1, struc
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c == value2);
+exp->string = PrintChar((char)(op1->c == value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9272,7 +9342,7 @@ static unsigned int UCharEqu(struct Expression * exp, struct Operand * op1, stru
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc == value2);
+exp->string = PrintUChar((unsigned char)(op1->uc == value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9287,7 +9357,7 @@ static unsigned int FloatEqu(struct Expression * exp, struct Operand * op1, stru
 float value2 = op2->f;
 
 exp->type = 2;
-exp->string = PrintFloat(op1->f == value2);
+exp->string = PrintFloat((float)(op1->f == value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9302,7 +9372,7 @@ static unsigned int DoubleEqu(struct Expression * exp, struct Operand * op1, str
 double value2 = op2->d;
 
 exp->type = 2;
-exp->string = PrintDouble(op1->d == value2);
+exp->string = PrintDouble((double)(op1->d == value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9317,7 +9387,7 @@ static unsigned int IntNqu(struct Expression * exp, struct Operand * op1, struct
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i != value2);
+exp->string = PrintInt((int)(op1->i != value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9332,7 +9402,7 @@ static unsigned int UIntNqu(struct Expression * exp, struct Operand * op1, struc
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui != value2);
+exp->string = PrintUInt((unsigned int)(op1->ui != value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9347,7 +9417,7 @@ static unsigned int Int64Nqu(struct Expression * exp, struct Operand * op1, stru
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 != value2);
+exp->string = PrintInt64((long long)(op1->i64 != value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9362,7 +9432,7 @@ static unsigned int UInt64Nqu(struct Expression * exp, struct Operand * op1, str
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 != value2);
+exp->string = PrintUInt64((uint64)(op1->ui64 != value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9377,7 +9447,7 @@ static unsigned int ShortNqu(struct Expression * exp, struct Operand * op1, stru
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s != value2);
+exp->string = PrintShort((short)(op1->s != value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9392,7 +9462,7 @@ static unsigned int UShortNqu(struct Expression * exp, struct Operand * op1, str
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us != value2);
+exp->string = PrintUShort((unsigned short)(op1->us != value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9407,7 +9477,7 @@ static unsigned int CharNqu(struct Expression * exp, struct Operand * op1, struc
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c != value2);
+exp->string = PrintChar((char)(op1->c != value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9422,7 +9492,7 @@ static unsigned int UCharNqu(struct Expression * exp, struct Operand * op1, stru
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc != value2);
+exp->string = PrintUChar((unsigned char)(op1->uc != value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9437,7 +9507,7 @@ static unsigned int FloatNqu(struct Expression * exp, struct Operand * op1, stru
 float value2 = op2->f;
 
 exp->type = 2;
-exp->string = PrintFloat(op1->f != value2);
+exp->string = PrintFloat((float)(op1->f != value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9452,7 +9522,7 @@ static unsigned int DoubleNqu(struct Expression * exp, struct Operand * op1, str
 double value2 = op2->d;
 
 exp->type = 2;
-exp->string = PrintDouble(op1->d != value2);
+exp->string = PrintDouble((double)(op1->d != value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9467,7 +9537,7 @@ static unsigned int IntAnd(struct Expression * exp, struct Operand * op1, struct
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i && value2);
+exp->string = PrintInt((int)(op1->i && value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9482,7 +9552,7 @@ static unsigned int UIntAnd(struct Expression * exp, struct Operand * op1, struc
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui && value2);
+exp->string = PrintUInt((unsigned int)(op1->ui && value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9497,7 +9567,7 @@ static unsigned int Int64And(struct Expression * exp, struct Operand * op1, stru
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 && value2);
+exp->string = PrintInt64((long long)(op1->i64 && value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9512,7 +9582,7 @@ static unsigned int UInt64And(struct Expression * exp, struct Operand * op1, str
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 && value2);
+exp->string = PrintUInt64((uint64)(op1->ui64 && value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9527,7 +9597,7 @@ static unsigned int ShortAnd(struct Expression * exp, struct Operand * op1, stru
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s && value2);
+exp->string = PrintShort((short)(op1->s && value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9542,7 +9612,7 @@ static unsigned int UShortAnd(struct Expression * exp, struct Operand * op1, str
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us && value2);
+exp->string = PrintUShort((unsigned short)(op1->us && value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9557,7 +9627,7 @@ static unsigned int CharAnd(struct Expression * exp, struct Operand * op1, struc
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c && value2);
+exp->string = PrintChar((char)(op1->c && value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9572,7 +9642,7 @@ static unsigned int UCharAnd(struct Expression * exp, struct Operand * op1, stru
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc && value2);
+exp->string = PrintUChar((unsigned char)(op1->uc && value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9587,7 +9657,7 @@ static unsigned int FloatAnd(struct Expression * exp, struct Operand * op1, stru
 float value2 = op2->f;
 
 exp->type = 2;
-exp->string = PrintFloat(op1->f && value2);
+exp->string = PrintFloat((float)(op1->f && value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9602,7 +9672,7 @@ static unsigned int DoubleAnd(struct Expression * exp, struct Operand * op1, str
 double value2 = op2->d;
 
 exp->type = 2;
-exp->string = PrintDouble(op1->d && value2);
+exp->string = PrintDouble((double)(op1->d && value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9617,7 +9687,7 @@ static unsigned int IntOr(struct Expression * exp, struct Operand * op1, struct
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i || value2);
+exp->string = PrintInt((int)(op1->i || value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9632,7 +9702,7 @@ static unsigned int UIntOr(struct Expression * exp, struct Operand * op1, struct
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui || value2);
+exp->string = PrintUInt((unsigned int)(op1->ui || value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9647,7 +9717,7 @@ static unsigned int Int64Or(struct Expression * exp, struct Operand * op1, struc
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 || value2);
+exp->string = PrintInt64((long long)(op1->i64 || value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9662,7 +9732,7 @@ static unsigned int UInt64Or(struct Expression * exp, struct Operand * op1, stru
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 || value2);
+exp->string = PrintUInt64((uint64)(op1->ui64 || value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9677,7 +9747,7 @@ static unsigned int ShortOr(struct Expression * exp, struct Operand * op1, struc
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s || value2);
+exp->string = PrintShort((short)(op1->s || value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9692,7 +9762,7 @@ static unsigned int UShortOr(struct Expression * exp, struct Operand * op1, stru
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us || value2);
+exp->string = PrintUShort((unsigned short)(op1->us || value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9707,7 +9777,7 @@ static unsigned int CharOr(struct Expression * exp, struct Operand * op1, struct
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c || value2);
+exp->string = PrintChar((char)(op1->c || value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9722,7 +9792,7 @@ static unsigned int UCharOr(struct Expression * exp, struct Operand * op1, struc
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc || value2);
+exp->string = PrintUChar((unsigned char)(op1->uc || value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9737,7 +9807,7 @@ static unsigned int FloatOr(struct Expression * exp, struct Operand * op1, struc
 float value2 = op2->f;
 
 exp->type = 2;
-exp->string = PrintFloat(op1->f || value2);
+exp->string = PrintFloat((float)(op1->f || value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9752,7 +9822,7 @@ static unsigned int DoubleOr(struct Expression * exp, struct Operand * op1, stru
 double value2 = op2->d;
 
 exp->type = 2;
-exp->string = PrintDouble(op1->d || value2);
+exp->string = PrintDouble((double)(op1->d || value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9767,7 +9837,7 @@ static unsigned int IntGrt(struct Expression * exp, struct Operand * op1, struct
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i > value2);
+exp->string = PrintInt((int)(op1->i > value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9782,7 +9852,7 @@ static unsigned int UIntGrt(struct Expression * exp, struct Operand * op1, struc
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui > value2);
+exp->string = PrintUInt((unsigned int)(op1->ui > value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9797,7 +9867,7 @@ static unsigned int Int64Grt(struct Expression * exp, struct Operand * op1, stru
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 > value2);
+exp->string = PrintInt64((long long)(op1->i64 > value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9812,7 +9882,7 @@ static unsigned int UInt64Grt(struct Expression * exp, struct Operand * op1, str
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 > value2);
+exp->string = PrintUInt64((uint64)(op1->ui64 > value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9827,7 +9897,7 @@ static unsigned int ShortGrt(struct Expression * exp, struct Operand * op1, stru
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s > value2);
+exp->string = PrintShort((short)(op1->s > value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9842,7 +9912,7 @@ static unsigned int UShortGrt(struct Expression * exp, struct Operand * op1, str
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us > value2);
+exp->string = PrintUShort((unsigned short)(op1->us > value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9857,7 +9927,7 @@ static unsigned int CharGrt(struct Expression * exp, struct Operand * op1, struc
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c > value2);
+exp->string = PrintChar((char)(op1->c > value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9872,7 +9942,7 @@ static unsigned int UCharGrt(struct Expression * exp, struct Operand * op1, stru
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc > value2);
+exp->string = PrintUChar((unsigned char)(op1->uc > value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9887,7 +9957,7 @@ static unsigned int FloatGrt(struct Expression * exp, struct Operand * op1, stru
 float value2 = op2->f;
 
 exp->type = 2;
-exp->string = PrintFloat(op1->f > value2);
+exp->string = PrintFloat((float)(op1->f > value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9902,7 +9972,7 @@ static unsigned int DoubleGrt(struct Expression * exp, struct Operand * op1, str
 double value2 = op2->d;
 
 exp->type = 2;
-exp->string = PrintDouble(op1->d > value2);
+exp->string = PrintDouble((double)(op1->d > value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9917,7 +9987,7 @@ static unsigned int IntSma(struct Expression * exp, struct Operand * op1, struct
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i < value2);
+exp->string = PrintInt((int)(op1->i < value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9932,7 +10002,7 @@ static unsigned int UIntSma(struct Expression * exp, struct Operand * op1, struc
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui < value2);
+exp->string = PrintUInt((unsigned int)(op1->ui < value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9947,7 +10017,7 @@ static unsigned int Int64Sma(struct Expression * exp, struct Operand * op1, stru
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 < value2);
+exp->string = PrintInt64((long long)(op1->i64 < value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9962,7 +10032,7 @@ static unsigned int UInt64Sma(struct Expression * exp, struct Operand * op1, str
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 < value2);
+exp->string = PrintUInt64((uint64)(op1->ui64 < value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9977,7 +10047,7 @@ static unsigned int ShortSma(struct Expression * exp, struct Operand * op1, stru
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s < value2);
+exp->string = PrintShort((short)(op1->s < value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -9992,7 +10062,7 @@ static unsigned int UShortSma(struct Expression * exp, struct Operand * op1, str
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us < value2);
+exp->string = PrintUShort((unsigned short)(op1->us < value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10007,7 +10077,7 @@ static unsigned int CharSma(struct Expression * exp, struct Operand * op1, struc
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c < value2);
+exp->string = PrintChar((char)(op1->c < value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10022,7 +10092,7 @@ static unsigned int UCharSma(struct Expression * exp, struct Operand * op1, stru
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc < value2);
+exp->string = PrintUChar((unsigned char)(op1->uc < value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10037,7 +10107,7 @@ static unsigned int FloatSma(struct Expression * exp, struct Operand * op1, stru
 float value2 = op2->f;
 
 exp->type = 2;
-exp->string = PrintFloat(op1->f < value2);
+exp->string = PrintFloat((float)(op1->f < value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10052,7 +10122,7 @@ static unsigned int DoubleSma(struct Expression * exp, struct Operand * op1, str
 double value2 = op2->d;
 
 exp->type = 2;
-exp->string = PrintDouble(op1->d < value2);
+exp->string = PrintDouble((double)(op1->d < value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10067,7 +10137,7 @@ static unsigned int IntGrtEqu(struct Expression * exp, struct Operand * op1, str
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i >= value2);
+exp->string = PrintInt((int)(op1->i >= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10082,7 +10152,7 @@ static unsigned int UIntGrtEqu(struct Expression * exp, struct Operand * op1, st
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui >= value2);
+exp->string = PrintUInt((unsigned int)(op1->ui >= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10097,7 +10167,7 @@ static unsigned int Int64GrtEqu(struct Expression * exp, struct Operand * op1, s
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 >= value2);
+exp->string = PrintInt64((long long)(op1->i64 >= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10112,7 +10182,7 @@ static unsigned int UInt64GrtEqu(struct Expression * exp, struct Operand * op1,
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 >= value2);
+exp->string = PrintUInt64((uint64)(op1->ui64 >= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10127,7 +10197,7 @@ static unsigned int ShortGrtEqu(struct Expression * exp, struct Operand * op1, s
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s >= value2);
+exp->string = PrintShort((short)(op1->s >= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10142,7 +10212,7 @@ static unsigned int UShortGrtEqu(struct Expression * exp, struct Operand * op1,
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us >= value2);
+exp->string = PrintUShort((unsigned short)(op1->us >= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10157,7 +10227,7 @@ static unsigned int CharGrtEqu(struct Expression * exp, struct Operand * op1, st
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c >= value2);
+exp->string = PrintChar((char)(op1->c >= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10172,7 +10242,7 @@ static unsigned int UCharGrtEqu(struct Expression * exp, struct Operand * op1, s
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc >= value2);
+exp->string = PrintUChar((unsigned char)(op1->uc >= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10187,7 +10257,7 @@ static unsigned int FloatGrtEqu(struct Expression * exp, struct Operand * op1, s
 float value2 = op2->f;
 
 exp->type = 2;
-exp->string = PrintFloat(op1->f >= value2);
+exp->string = PrintFloat((float)(op1->f >= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10202,7 +10272,7 @@ static unsigned int DoubleGrtEqu(struct Expression * exp, struct Operand * op1,
 double value2 = op2->d;
 
 exp->type = 2;
-exp->string = PrintDouble(op1->d >= value2);
+exp->string = PrintDouble((double)(op1->d >= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10217,7 +10287,7 @@ static unsigned int IntSmaEqu(struct Expression * exp, struct Operand * op1, str
 int value2 = op2->i;
 
 exp->type = 2;
-exp->string = PrintInt(op1->i <= value2);
+exp->string = PrintInt((int)(op1->i <= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10232,7 +10302,7 @@ static unsigned int UIntSmaEqu(struct Expression * exp, struct Operand * op1, st
 unsigned int value2 = op2->ui;
 
 exp->type = 2;
-exp->string = PrintUInt(op1->ui <= value2);
+exp->string = PrintUInt((unsigned int)(op1->ui <= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10247,7 +10317,7 @@ static unsigned int Int64SmaEqu(struct Expression * exp, struct Operand * op1, s
 long long value2 = op2->i64;
 
 exp->type = 2;
-exp->string = PrintInt64(op1->i64 <= value2);
+exp->string = PrintInt64((long long)(op1->i64 <= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10262,7 +10332,7 @@ static unsigned int UInt64SmaEqu(struct Expression * exp, struct Operand * op1,
 uint64 value2 = op2->ui64;
 
 exp->type = 2;
-exp->string = PrintUInt64(op1->ui64 <= value2);
+exp->string = PrintUInt64((uint64)(op1->ui64 <= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10277,7 +10347,7 @@ static unsigned int ShortSmaEqu(struct Expression * exp, struct Operand * op1, s
 short value2 = op2->s;
 
 exp->type = 2;
-exp->string = PrintShort(op1->s <= value2);
+exp->string = PrintShort((short)(op1->s <= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10292,7 +10362,7 @@ static unsigned int UShortSmaEqu(struct Expression * exp, struct Operand * op1,
 unsigned short value2 = op2->us;
 
 exp->type = 2;
-exp->string = PrintUShort(op1->us <= value2);
+exp->string = PrintUShort((unsigned short)(op1->us <= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10307,7 +10377,7 @@ static unsigned int CharSmaEqu(struct Expression * exp, struct Operand * op1, st
 char value2 = op2->c;
 
 exp->type = 2;
-exp->string = PrintChar(op1->c <= value2);
+exp->string = PrintChar((char)(op1->c <= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10322,7 +10392,7 @@ static unsigned int UCharSmaEqu(struct Expression * exp, struct Operand * op1, s
 unsigned char value2 = op2->uc;
 
 exp->type = 2;
-exp->string = PrintUChar(op1->uc <= value2);
+exp->string = PrintUChar((unsigned char)(op1->uc <= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10337,7 +10407,7 @@ static unsigned int FloatSmaEqu(struct Expression * exp, struct Operand * op1, s
 float value2 = op2->f;
 
 exp->type = 2;
-exp->string = PrintFloat(op1->f <= value2);
+exp->string = PrintFloat((float)(op1->f <= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10352,7 +10422,7 @@ static unsigned int DoubleSmaEqu(struct Expression * exp, struct Operand * op1,
 double value2 = op2->d;
 
 exp->type = 2;
-exp->string = PrintDouble(op1->d <= value2);
+exp->string = PrintDouble((double)(op1->d <= value2));
 if(!exp->expType)
 {
 exp->expType = op1->type;
@@ -10466,32 +10536,6 @@ op1->type->refCount++;
 return 0x1;
 }
 
-static unsigned int FloatCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
-{
-exp->type = 2;
-exp->string = PrintFloat(op1->f ? op2->f : op3->f);
-if(!exp->expType)
-{
-exp->expType = op1->type;
-if(op1->type)
-op1->type->refCount++;
-}
-return 0x1;
-}
-
-static unsigned int DoubleCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
-{
-exp->type = 2;
-exp->string = PrintDouble(op1->d ? op2->d : op3->d);
-if(!exp->expType)
-{
-exp->expType = op1->type;
-if(op1->type)
-op1->type->refCount++;
-}
-return 0x1;
-}
-
 struct OpTable intOps = 
 {
 IntAdd, IntSub, IntMul, IntDiv, IntMod, IntNeg, IntInc, IntDec, IntAsign, IntAddAsign, IntSubAsign, IntMulAsign, IntDivAsign, IntModAsign, IntBitAnd, IntBitOr, IntBitXor, IntLShift, IntRShift, IntBitNot, IntAndAsign, IntOrAsign, IntXorAsign, IntLShiftAsign, IntRShiftAsign, IntNot, IntEqu, IntNqu, IntAnd, IntOr, IntGrt, IntSma, IntGrtEqu, IntSmaEqu, IntCond
@@ -11445,9 +11489,8 @@ else if(dataMember)
 {
 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
 struct Type * type;
-int part = 0;
+uint64 part;
 
-GetInt(value, &part);
 bits = (bits & ~bitMember->mask);
 if(!bitMember->dataType)
 bitMember->dataType = ProcessTypeString(bitMember->dataTypeString, 0x0);
@@ -11462,52 +11505,57 @@ switch(type->kind)
 {
 case 24:
 case 1:
-if(type->isSigned)
-bits |= ((char)part << bitMember->pos);
-else
-bits |= ((unsigned char)part << bitMember->pos);
+{
+unsigned char v;
+
+type->isSigned ? GetChar(value, &v) : GetUChar(value, &v);
+part = (uint64)v;
 break;
+}
 case 2:
-if(type->isSigned)
-bits |= ((short)part << bitMember->pos);
-else
-bits |= ((unsigned short)part << bitMember->pos);
+{
+unsigned short v;
+
+type->isSigned ? GetShort(value, &v) : GetUShort(value, &v);
+part = (uint64)v;
 break;
+}
 case 3:
 case 5:
-if(type->isSigned)
-bits |= (part << bitMember->pos);
-else
-bits |= ((unsigned int)part << bitMember->pos);
+{
+unsigned int v;
+
+type->isSigned ? GetInt(value, &v) : GetUInt(value, &v);
+part = (uint64)v;
 break;
+}
 case 4:
-if(type->isSigned)
-bits |= ((long long)part << bitMember->pos);
-else
-bits |= ((uint64)part << bitMember->pos);
-break;
-case 22:
-if(type->isSigned)
 {
-bits |= ((intptr_t)part << bitMember->pos);
+uint64 v;
+
+type->isSigned ? GetInt64(value, &v) : GetUInt64(value, &v);
+part = v;
+break;
 }
-else
+case 22:
 {
-bits |= ((uintptr_t)part << bitMember->pos);
-}
+intptr_t v;
+
+type->isSigned ? GetIntPtr(value, &v) : GetUIntPtr(value, &v);
+part = (uint64)v;
 break;
-case 23:
-if(type->isSigned)
-{
-bits |= ((ssize_t)part << bitMember->pos);
 }
-else
+case 23:
 {
-bits |= ((size_t)part << bitMember->pos);
-}
+ssize_t v;
+
+type->isSigned ? GetIntSize(value, &v) : GetUIntSize(value, &v);
+part = (uint64)v;
 break;
 }
 }
+bits += part << bitMember->pos;
+}
 }
 }
 else
@@ -11896,11 +11944,15 @@ n = e->next;
 if(!n)
 {
 struct __ecereNameSpace__ecere__sys__OldList * list = exp->list;
+struct Expression * prev = exp->prev;
+struct Expression * next = exp->next;
 
 ComputeExpression(e);
 FreeType(exp->expType);
 FreeType(exp->destType);
 *exp = *e;
+exp->prev = prev;
+exp->next = next;
 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor(e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
 }
@@ -12565,6 +12617,8 @@ struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecere
 int objectType = exp->expType ? exp->expType->classObjectType : 0;
 
 *newExp = *exp;
+newExp->prev = (((void *)0));
+newExp->next = (((void *)0));
 newExp->destType = (((void *)0));
 if(convert->isGet)
 {
@@ -13793,8 +13847,6 @@ extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, s
 
 extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
 
-extern struct Expression * CopyExpression(struct Expression * exp);
-
 extern struct Expression * MkExpTypeSize(struct TypeName * typeName);
 
 extern struct Expression * MkExpClass(struct __ecereNameSpace__ecere__sys__OldList *  specifiers, struct Declarator * decl);
@@ -13897,7 +13949,7 @@ id->classSym = (((void *)0));
 exp->expType = type;
 if(type)
 type->refCount++;
-if(type && (type->kind == 15 || (_class && _class->type == 4)))
+if(type && (type->kind == 15))
 exp->isConstant = 0x1;
 if(symbol->isParam || !strcmp(id->string, "this"))
 {
@@ -14221,6 +14273,7 @@ struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
 unsigned int useDestType = 0x0, useSideType = 0x0;
 struct Location oldyylloc = yylloc;
 unsigned int useSideUnit = 0x0;
+struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->_class) ? exp->destType->_class->registered : (((void *)0));
 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
 
 switch(exp->op.op)
@@ -14257,13 +14310,27 @@ break;
 case '+':
 case '-':
 useSideUnit = 0x1;
+useSideType = 0x1;
+useDestType = 0x1;
+break;
+case LEFT_OP:
+case RIGHT_OP:
+useSideType = 0x1;
+useDestType = 0x1;
+break;
 case '|':
-case '&':
 case '^':
+useSideType = 0x1;
+useDestType = 0x1;
+break;
 case '/':
 case '%':
+useSideType = 0x1;
+useDestType = 0x1;
+break;
+case '&':
 case '*':
-if(exp->op.op != '*' || exp->op.exp1)
+if(exp->op.exp1)
 {
 useSideType = 0x1;
 useDestType = 0x1;
@@ -14293,11 +14360,14 @@ break;
 }
 if(exp->op.exp1)
 {
-if(exp->destType && exp->destType->kind == 8 && exp->destType->_class && exp->destType->_class->registered && useDestType && ((exp->destType->_class->registered->type == 3 && useSideUnit) || exp->destType->_class->registered->type == 4 || exp->destType->_class->registered->type == 2))
+if(exp->op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
+useDestType = 0x0;
+if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
 {
 if(exp->op.exp1->destType)
 FreeType(exp->op.exp1->destType);
 exp->op.exp1->destType = exp->destType;
+exp->op.exp1->opDestType = 0x1;
 if(exp->destType)
 exp->destType->refCount++;
 }
@@ -14313,6 +14383,13 @@ exp->op.exp1->destType->count++;
 ProcessExpressionType(exp->op.exp1);
 if(exp->op.exp1->destType && exp->op.op != '=')
 exp->op.exp1->destType->count--;
+exp->op.exp1->opDestType = 0x0;
+if(!exp->op.exp2 && (exp->op.op == INC_OP || exp->op.op == DEC_OP) && exp->op.exp1->expType && exp->op.exp1->expType->kind == 8 && exp->op.exp1->expType->_class && exp->op.exp1->expType->_class->registered && exp->op.exp1->expType->_class->registered->type == 3)
+{
+exp->op.exp2 = MkExpConstant("1");
+exp->op.op = exp->op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
+assign = 0x1;
+}
 if(exp->op.exp1->destType == dummy)
 {
 FreeType(dummy);
@@ -14336,6 +14413,8 @@ exp->op.exp1->expType->refCount++;
 else
 {
 exp->op.exp2->destType = exp->destType;
+if(!exp->op.exp1 || exp->op.op != '&')
+exp->op.exp2->opDestType = 0x1;
 if(exp->destType)
 exp->destType->refCount++;
 }
@@ -14377,11 +14456,13 @@ if(type1)
 type1->refCount++;
 exp->expType = type1;
 }
-else if(exp->destType && exp->destType->kind == 8 && exp->destType->_class && exp->destType->_class->registered && ((exp->destType->_class->registered->type == 3 && useDestType && useSideUnit) || (exp->destType->_class->registered->type == 4 && useDestType)))
+else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
 {
 if(exp->op.exp2->destType)
 FreeType(exp->op.exp2->destType);
 exp->op.exp2->destType = exp->destType;
+if(exp->op.op != '&')
+exp->op.exp2->opDestType = 0x1;
 if(exp->destType)
 exp->destType->refCount++;
 }
@@ -14418,6 +14499,7 @@ if(e->type == 11 && e->cast.exp)
 e->cast.exp->needCast = 0x1;
 }
 ProcessExpressionType(exp->op.exp2);
+exp->op.exp2->opDestType = 0x0;
 if(exp->op.exp2->destType && exp->op.op != '=')
 exp->op.exp2->destType->count--;
 if(assign && type1 && type1->kind == 13 && exp->op.exp2->expType)
@@ -14534,6 +14616,25 @@ else if(exp->op.exp1 && exp->op.exp2 && ((useSideType) || ((!type1 || type1->kin
 {
 if(type1 && type2 && ((type1->kind == 8 && type1->_class && strcmp(type1->_class->string, "String")) == (type2->kind == 8 && type2->_class && strcmp(type2->_class->string, "String"))))
 {
+if(exp->op.op == '-' && ((type1->kind == 8 && type1->_class->registered && type1->_class->registered->type == 4) || (type2->kind == 8 && type2->_class->registered && type2->_class->registered->type == 4)))
+{
+struct Type * intType;
+
+if(!type1->_class->registered->dataType)
+type1->_class->registered->dataType = ProcessTypeString(type1->_class->registered->dataTypeString, 0x0);
+if(!type2->_class->registered->dataType)
+type2->_class->registered->dataType = ProcessTypeString(type2->_class->registered->dataTypeString, 0x0);
+intType = ProcessTypeString((type1->_class->registered->dataType->kind == 4 || type2->_class->registered->dataType->kind == 4) ? "int64" : "int", 0x0);
+if(exp->op.exp1->destType)
+FreeType(exp->op.exp1->destType);
+if(exp->op.exp2->destType)
+FreeType(exp->op.exp2->destType);
+exp->op.exp1->destType = intType;
+exp->op.exp2->destType = intType;
+intType->refCount++;
+}
+else
+{
 if(exp->op.exp2->destType)
 FreeType(exp->op.exp2->destType);
 exp->op.exp2->destType = type1;
@@ -14542,6 +14643,7 @@ if(exp->op.exp1->destType)
 FreeType(exp->op.exp1->destType);
 exp->op.exp1->destType = type2;
 type2->refCount++;
+}
 if(!boolResult && type1->kind == 8 && (!exp->destType || exp->destType->kind != 8) && type1->_class->registered && type1->_class->registered->type == 3 && type2->_class->registered && type2->_class->registered->type == 3 && type1->_class->registered != type2->_class->registered)
 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "operating on %s and %s with an untyped result, assuming %s\n", (((void *)0))), type1->_class->string, type2->_class->string, type1->_class->string);
 if(type1->kind == 13 && type1->type->kind == 20 && type2->kind != 13)
@@ -14750,21 +14852,53 @@ type1 = exp->op.exp1->destType;
 exp->expType = type1;
 type1->refCount++;
 }
-if(!boolResult || exp->op.op == '>' || exp->op.op == '<')
+if(!boolResult || exp->op.op == '>' || exp->op.op == '<' || exp->op.op == GE_OP || exp->op.op == LE_OP)
+{
+unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->_class && type1->_class->registered && type1->_class->registered->type == 4;
+unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->_class && type2->_class->registered && type2->_class->registered->type == 4;
+
+if(exp->op.op == '*' || exp->op.op == '/' || exp->op.op == '-' || exp->op.op == '|' || exp->op.op == '^')
+{
+if(op1IsEnum && exp->op.exp2->expType)
+{
+if(CheckExpressionType(exp->op.exp1, exp->op.exp2->expType, 0x0))
+{
+if(exp->expType)
+FreeType(exp->expType);
+exp->expType = exp->op.exp2->expType;
+if(exp->op.exp2->expType)
+exp->op.exp2->expType->refCount++;
+valid = 0x1;
+}
+}
+else if(op2IsEnum && exp->op.exp1->expType)
+{
+if(CheckExpressionType(exp->op.exp2, exp->op.exp1->expType, 0x0))
+{
+if(exp->expType)
+FreeType(exp->expType);
+exp->expType = exp->op.exp1->expType;
+if(exp->op.exp1->expType)
+exp->op.exp1->expType->refCount++;
+valid = 0x1;
+}
+}
+}
+else
 {
-if(type1->kind == 8 && type1->_class && type1->_class->registered && type1->_class->registered->type == 4 && exp->op.exp2->expType)
+if(op1IsEnum && exp->op.exp2->expType)
 {
 if(CheckExpressionType(exp->op.exp1, exp->op.exp2->expType, 0x0))
 {
 if(exp->expType)
 FreeType(exp->expType);
 exp->expType = exp->op.exp1->expType;
-if(exp->op.exp2->expType)
+if(exp->op.exp1->expType)
 exp->op.exp1->expType->refCount++;
 valid = 0x1;
 }
 }
-else if(type2 && (type2->kind == 8 && type2->_class && type2->_class->registered && type2->_class->registered->type == 4 && exp->op.exp1->expType))
+else if(op2IsEnum && exp->op.exp1->expType)
 {
 if(CheckExpressionType(exp->op.exp2, exp->op.exp1->expType, 0x0))
 {
@@ -14777,8 +14911,26 @@ valid = 0x1;
 }
 }
 }
+}
 if(!valid)
 {
+if(type2 && type2->kind == 8 && type2->_class && type2->_class->registered && type2->_class->registered->type == 3 && (type1->kind != 8 || !type1->_class || !type1->_class->registered || type1->_class->registered->type != 3))
+{
+if(exp->op.exp1->destType)
+FreeType(exp->op.exp1->destType);
+exp->op.exp1->destType = type2;
+type2->refCount++;
+if(CheckExpressionType(exp->op.exp1, exp->op.exp1->destType, 0x0))
+{
+if(exp->expType)
+FreeType(exp->expType);
+exp->expType = exp->op.exp1->destType;
+if(exp->op.exp1->destType)
+exp->op.exp1->destType->refCount++;
+}
+}
+else
+{
 if(exp->op.exp2->destType)
 FreeType(exp->op.exp2->destType);
 exp->op.exp2->destType = type1;
@@ -14827,6 +14979,7 @@ exp->op.exp2->expType->refCount++;
 }
 }
 }
+}
 else if(type2)
 {
 if(type2->kind == 8 && type2->_class && type2->_class->registered && type2->_class->registered->type == 4)
@@ -14950,6 +15103,7 @@ unsigned int inced = 0x0;
 if(!e->next)
 {
 FreeType(e->destType);
+e->opDestType = exp->opDestType;
 e->destType = exp->destType;
 if(e->destType)
 {
@@ -17768,7 +17922,7 @@ ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
 ListAdd(stmt->expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
 }
 else
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), prop->name, _class->fullName);
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
 }
 }
 }
@@ -17914,7 +18068,7 @@ ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("
 ListAdd(stmt->expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
 }
 else
-Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), prop->name, _class->fullName);
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
 }
 }
 if(object)
@@ -18418,6 +18572,7 @@ ProcessFunction(external->function);
 else if(external->type == 1)
 {
 currentClass = (((void *)0));
+if(external->declaration)
 ProcessDeclaration(external->declaration);
 }
 else if(external->type == 2)
@@ -18442,6 +18597,7 @@ thisNameSpace = external->id->string;
 }
 currentClass = (((void *)0));
 thisNameSpace = (((void *)0));
+curExternal = (((void *)0));
 ((temp->symbol ? (__ecereClass_Symbol->Destructor ? __ecereClass_Symbol->Destructor(temp->symbol) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(temp->symbol)) : 0), temp->symbol = 0);
 ((temp ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor(temp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(temp)) : 0), temp = 0);
 }