* src/pic16/gen.c: fixed bug #1106975,
[fw/sdcc] / src / SDCCsymt.c
index 7ccca8c333cf0003ef27fba9cb77bc1bd523a630..dbcfd6630cdbf25ce093efed252442fc456aede3 100644 (file)
@@ -2293,6 +2293,12 @@ checkFunction (symbol * sym, symbol *csym)
       }
     }
 
+  if (IFFUNC_ISSHADOWREGS(sym->type) && !FUNC_ISISR (sym->type))
+    {
+      werror (E_SHADOWREGS_NO_ISR, sym->name);
+    }
+
+
   for (argCnt=1, acargs = FUNC_ARGS(sym->type); 
        acargs; 
        acargs=acargs->next, argCnt++) {
@@ -2361,6 +2367,17 @@ checkFunction (symbol * sym, symbol *csym)
       werror (E_PREV_DEF_CONFLICT, csym->name, "reentrant");
     }
 
+  if (IFFUNC_ISWPARAM (csym->type) != IFFUNC_ISWPARAM (sym->type))
+    {
+      werror (E_PREV_DEF_CONFLICT, csym->name, "wparam");
+    }
+
+  if (IFFUNC_ISSHADOWREGS (csym->type) != IFFUNC_ISSHADOWREGS (sym->type))
+    {
+      werror (E_PREV_DEF_CONFLICT, csym->name, "shadowregs");
+    }
+  
+
   /* compare expected args with actual args */
   exargs = FUNC_ARGS(csym->type);
   acargs = FUNC_ARGS(sym->type);