use normal C compiler
authorceriel <none@none>
Tue, 19 Dec 1989 11:07:03 +0000 (11:07 +0000)
committerceriel <none@none>
Tue, 19 Dec 1989 11:07:03 +0000 (11:07 +0000)
lang/cem/cemcom.ansi/LLlex.c
lang/cem/cemcom.ansi/Makefile

index 128dd74..a7851d2 100644 (file)
@@ -797,9 +797,14 @@ struct token *ptok;
        if (ovfl) {
                lexwarning("overflow in constant");
                fund = ULONG;
-       } else if ((val & full_mask[(int)int_size]) == val) {
-               if (val >= 0 && val <= max_int) fund = INT;
-               else fund = (((base == 10) && !uns_flg) ? LONG : UNSIGNED);
+       } else if (!lng_flg && (val & full_mask[(int)int_size]) == val) {
+               if (val >= 0 && val <= max_int) {
+                       fund = INT;
+               } else if (int_size == long_size) {
+                       fund = UNSIGNED;
+               } else if (base == 10 && !uns_flg)
+                       fund = LONG;
+               else    fund = UNSIGNED;
        } else if((val & full_mask[(int)long_size]) == val) {
                if (val > 0) fund = LONG;
                else fund = ULONG;
@@ -811,8 +816,8 @@ struct token *ptok;
                fund = ULONG;
        }
        if (lng_flg) {
-           if (fund == INT) fund = LONG;
-           else if (fund == UNSIGNED) fund = ULONG;
+               /* fund can't be INT */
+               if (fund == UNSIGNED) fund = ULONG;
        }
        if (uns_flg) {
            if (fund == INT) fund = UNSIGNED;
index 9173467..2e20733 100644 (file)
@@ -3,8 +3,7 @@
 
 # Machine and environ dependent definitions
 EMHOME = ../../..
-CC = $(EMHOME)/bin/fcc
-#CC = cc
+CC = cc
 CFLOW = cflow
 MKDEP = $(EMHOME)/bin/mkdep
 PRID = $(EMHOME)/bin/prid
@@ -169,9 +168,9 @@ Lnt:        Cfiles
        @rm -f nmclash.o a.out
 
 install:       Main
-       rm -f $(EMHOME)/lib/em_cemcom $(EMHOME)/man/em_cemcom.6
-       cp $(CURRDIR)main $(EMHOME)/lib/em_cemcom
-       cp $(CURRDIR)cemcom.1 $(EMHOME)/man/em_cemcom.6
+       rm -f $(EMHOME)/lib/em_cemcom $(EMHOME)/man/em_cemcom.6
+       cp $(CURRDIR)main $(EMHOME)/lib/em_cemcom.ansi
+       cp $(CURRDIR)cemcom.1 $(EMHOME)/man/em_cemcom.6
 
 Oinstall:      Omain
        cp $(CURRDIR)omain $(EMHOME)/lib/em_cemcomO