compiler/libec: Fixed keeping cast between long/int types
[sdk] / compiler / bootstrap / libec / bootstrap / pass2.c
index 393ee95..3e7eb03 100644 (file)
@@ -908,6 +908,7 @@ struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
 struct Context * ctx;
 int isIterator;
 struct Expression * propCategory;
+unsigned int mustRegister;
 } __attribute__ ((gcc_struct));
 
 extern void DeclareMethod(struct External * neededFor, struct __ecereNameSpace__ecere__com__Method * method, const char *  name);
@@ -998,6 +999,7 @@ int kind;
 unsigned int size;
 char *  name;
 char *  typeName;
+struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
 int classObjectType;
 int alignment;
 unsigned int offset;
@@ -1018,6 +1020,7 @@ unsigned int declaredWithStruct : 1;
 unsigned int typedByReference : 1;
 unsigned int casted : 1;
 unsigned int pointerAlignment : 1;
+unsigned int isLong : 1;
 } __attribute__ ((gcc_struct));
 
 struct Specifier
@@ -1035,6 +1038,7 @@ struct ExtDecl * extDecl;
 char *  name;
 struct Symbol * symbol;
 struct __ecereNameSpace__ecere__sys__OldList *  templateArgs;
+struct Specifier * nsSpec;
 } __attribute__ ((gcc_struct)) __anon1;
 struct
 {
@@ -3973,7 +3977,12 @@ nbExp->needTemplateCast = 2;
 if(((unsigned int)((exp->usage & 0x80) >> 7)))
 strcpy(typeString, "void *");
 else
+{
+if(exp->expType->kind == 20 && exp->expType->__anon1.templateParameter && exp->expType->__anon1.templateParameter->dataTypeString)
+strcpy(typeString, exp->expType->__anon1.templateParameter->dataTypeString);
+else
 PrintType(exp->expType, typeString, 0, 0);
+}
 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
 if(specs && (*specs).first && ((struct Specifier *)(*specs).first)->type == 8 && exp->destType && !exp->destType->passAsTemplate && exp->destType->kind == 20 && exp->destType->__anon1.templateParameter && (exp->destType->__anon1.templateParameter->dataTypeString || exp->destType->__anon1.templateParameter->__anon1.dataType) && !((unsigned int)((exp->usage & 0x4) >> 2)))
 {