]> git.gag.com Git - fw/sdcc/commitdiff
Don't call a function, unless it's a function
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 7 Sep 2001 13:26:14 +0000 (13:26 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 7 Sep 2001 13:26:14 +0000 (13:26 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1236 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCicode.c

index 4e2af8d76109a1fefec987c639e569607b9a1ca7..4dab87ed2e64f88ecea9eea12987182014d445e8 100644 (file)
@@ -2661,6 +2661,11 @@ geniCodeCall (operand * left, ast * parms,int lvl)
   sym_link *type, *etype;
   int stack = 0;
 
+  if (!IS_FUNC(OP_SYMBOL(left)->type)) {
+    werror (E_FUNCTION_EXPECTED);
+    return NULL;
+  }
+
   /* take care of parameters with side-effecting
      function calls in them, this is required to take care
      of overlaying function parameters */