z80 and mcs51 linkers complaint if a public symbol is defined in more
[fw/sdcc] / as / mcs51 / asexpr.c
index e675be354abeaa5a5f17ab0eea593a032695526b..26aea4b0a015f474d23a3f33ae7e8533c999e942 100644 (file)
@@ -1,4 +1,4 @@
-/* asexpr.c */
+       /* asexpr.c */
 
 /*
  * (C) Copyright 1989-1995
@@ -12,7 +12,6 @@
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
-#include <alloc.h>
 #include "asm.h"
 
 /*)Module      asexpr.c
@@ -28,7 +27,7 @@
  *
  *     asexpr.c contains the following functions:
  *             VOID    abscheck()
- *             addr_t  absexpr()
+ *             Addr_T  absexpr()
  *             VOID    clrexpr()
  *             int     digit()
  *             VOID    expr()
@@ -230,7 +229,7 @@ int n;
         unget(c);
 }
 
-/*)Function    addr_t  absexpr()
+/*)Function    Addr_T  absexpr()
  *
  *     The function absexpr() evaluates an expression, verifies it
  *     is absolute (i.e. not position dependent or relocatable), and
@@ -252,7 +251,7 @@ int n;
  *             a 'r' error is reported.
  */
 
-addr_t
+Addr_T
 absexpr()
 {
         struct expr e;
@@ -339,7 +338,7 @@ register struct expr *esp;
         if (c == '-') {
                 expr(esp, 100);
                 abscheck(esp);
-                esp->e_addr = -esp->e_addr;
+                esp->e_addr = 0-esp->e_addr;
                 return;
         }
         if (c == '~') {