* fixed GCC 4.4.0 mingw compilation:
[fw/sdcc] / src / SDCCicode.c
index 0c5264fddcaab7dd342cdc0fd5545e0528a087dc..fe437728ce97f42e0c4663a2e65b8a25a3f8b5df 100644 (file)
@@ -1954,6 +1954,10 @@ getPtrType(sym_link *type)
   if (TARGET_Z80_LIKE)
     return POINTER;
 
+  //preserve original behaviour for PIC16
+  if (TARGET_IS_PIC16)
+    return POINTER;
+
   //for HC08 only zeropage ptr is different
   if (TARGET_IS_HC08)
     {
@@ -3187,7 +3191,7 @@ geniCodeConditional (ast * tree,int lvl)
   ast *astTrue  = tree->right->left;
   ast *astFalse = tree->right->right;
   operand *cond = ast2iCode (tree->left, lvl+1);
-  operand *result = newiTempOperand (tree->right->ftype, 0);
+  operand *result = newiTempOperand (tree->ftype, 0);
   operand *opTrue, *opFalse;
 
   ic = newiCodeCondition (geniCodeRValue (cond, FALSE), NULL, falseLabel);
@@ -3976,7 +3980,7 @@ geniCodeCritical (ast *tree, int lvl)
   operand *op = NULL;
   sym_link *type;
 
-  if (!options.stackAuto)
+  if (!options.stackAuto && !TARGET_IS_HC08)
     {
       type = newLink(SPECIFIER);
       SPEC_VOLATILE(type) = 1;