Răsfoiți Sursa

* use of is_ordinal checked: often a qword/int64 isn't allowed (case/for ...)
* small qword problems fixed

florian 26 ani în urmă
părinte
comite
497a3d3686
4 a modificat fișierele cu 27 adăugiri și 8 ștergeri
  1. 7 2
      compiler/pdecl.pas
  2. 6 2
      compiler/pstatmnt.pas
  3. 8 2
      compiler/tccnv.pas
  4. 6 2
      compiler/tcflw.pas

+ 7 - 2
compiler/pdecl.pas

@@ -541,7 +541,7 @@ unit pdecl;
                   casedef:=read_type('');
                   symtablestack^.insert(new(pvarsym,init(s,casedef)));
                 end;
-              if not is_ordinal(casedef) then
+              if not(is_ordinal(casedef)) or is_64bitint(casedef)  then
                Message(type_e_ordinal_expr_expected);
               consume(_OF);
               startvarrec:=symtablestack^.datasize;
@@ -1034,6 +1034,7 @@ unit pdecl;
                   begin
                      consume(_DEFAULT);
                      if not(is_ordinal(p^.proptype) or
+                         is_64bitint(p^.proptype) or
                        ((p^.proptype^.deftype=setdef) and
                         (psetdef(p^.proptype)^.settype=smallset)
                        ) or
@@ -2219,7 +2220,11 @@ unit pdecl;
 end.
 {
   $Log$
-  Revision 1.127  1999-06-02 22:44:10  pierre
+  Revision 1.128  1999-06-30 22:16:19  florian
+    * use of is_ordinal checked: often a qword/int64 isn't allowed (case/for ...)
+    * small qword problems fixed
+
+  Revision 1.127  1999/06/02 22:44:10  pierre
    * previous wrong log corrected
 
   Revision 1.126  1999/06/02 22:25:42  pierre

+ 6 - 2
compiler/pstatmnt.pas

@@ -188,7 +188,7 @@ unit pstatmnt;
          cleartempgen;
          do_firstpass(caseexpr);
          casedef:=caseexpr^.resulttype;
-         if not(is_ordinal(casedef)) then
+         if not(is_ordinal(casedef) or is_64bitint(casedef)) then
            Message(type_e_ordinal_expr_expected);
 
          consume(_OF);
@@ -1276,7 +1276,11 @@ unit pstatmnt;
 end.
 {
   $Log$
-  Revision 1.90  1999-06-22 16:24:43  pierre
+  Revision 1.91  1999-06-30 22:16:22  florian
+    * use of is_ordinal checked: often a qword/int64 isn't allowed (case/for ...)
+    * small qword problems fixed
+
+  Revision 1.90  1999/06/22 16:24:43  pierre
    * local browser stuff corrected
 
   Revision 1.89  1999/06/17 13:19:54  pierre

+ 8 - 2
compiler/tccnv.pas

@@ -831,7 +831,9 @@ implementation
          end;
 
         { ordinal contants can be directly converted }
-        if (p^.left^.treetype=ordconstn) and is_ordinal(p^.resulttype) then
+        { but not int64/qword                        }
+        if (p^.left^.treetype=ordconstn) and is_ordinal(p^.resulttype) and
+          not(is_64bitint(p^.resulttype)) then
           begin
              { range checking is done in genordinalconstnode (PFV) }
              hp:=genordinalconstnode(p^.left^.value,p^.resulttype);
@@ -924,7 +926,11 @@ implementation
 end.
 {
   $Log$
-  Revision 1.40  1999-06-28 22:29:21  florian
+  Revision 1.41  1999-06-30 22:16:23  florian
+    * use of is_ordinal checked: often a qword/int64 isn't allowed (case/for ...)
+    * small qword problems fixed
+
+  Revision 1.40  1999/06/28 22:29:21  florian
     * qword division fixed
     + code for qword/int64 type casting added:
       range checking isn't implemented yet

+ 6 - 2
compiler/tcflw.pas

@@ -283,7 +283,7 @@ implementation
          if (hp^.treetype<>loadn) then
           CGMessage(cg_e_illegal_count_var)
          else
-          if (not(is_ordinal(p^.t2^.resulttype))) then
+          if (not(is_ordinal(p^.t2^.resulttype)) or is_64bitint(p^.t2^.resulttype)) then
            CGMessage(type_e_ordinal_expr_expected);
 
          if p^.t2^.registers32>p^.registers32 then
@@ -495,7 +495,11 @@ implementation
 end.
 {
   $Log$
-  Revision 1.11  1999-06-13 22:41:07  peter
+  Revision 1.12  1999-06-30 22:16:25  florian
+    * use of is_ordinal checked: often a qword/int64 isn't allowed (case/for ...)
+    * small qword problems fixed
+
+  Revision 1.11  1999/06/13 22:41:07  peter
     * merged from fixes
 
   Revision 1.10.2.1  1999/06/13 22:38:54  peter