Browse Source

* allow para+offset

peter 26 years ago
parent
commit
3806c22d23
1 changed files with 8 additions and 3 deletions
  1. 8 3
      compiler/ra386att.pas

+ 8 - 3
compiler/ra386att.pas

@@ -1196,6 +1196,7 @@ var
 
 
   procedure MaybeRecordOffset;
   procedure MaybeRecordOffset;
   var
   var
+    hasdot  : boolean;
     l,
     l,
     toffset,
     toffset,
     tsize   : longint;
     tsize   : longint;
@@ -1203,7 +1204,8 @@ var
     if not(actasmtoken in [AS_DOT,AS_PLUS,AS_MINUS]) then
     if not(actasmtoken in [AS_DOT,AS_PLUS,AS_MINUS]) then
      exit;
      exit;
     l:=0;
     l:=0;
-    if actasmtoken=AS_DOT then
+    hasdot:=(actasmtoken=AS_DOT);
+    if hasdot then
      begin
      begin
        if expr<>'' then
        if expr<>'' then
          begin
          begin
@@ -1216,7 +1218,7 @@ var
      inc(l,BuildConstExpression(true,false));
      inc(l,BuildConstExpression(true,false));
     if opr.typ=OPR_REFERENCE then
     if opr.typ=OPR_REFERENCE then
      begin
      begin
-       if opr.ref.options=ref_parafixup then
+       if hasdot and (opr.ref.options=ref_parafixup) then
         Message(asmr_e_cannot_access_field_directly_for_parameters);
         Message(asmr_e_cannot_access_field_directly_for_parameters);
        inc(opr.ref.offset,l)
        inc(opr.ref.offset,l)
      end
      end
@@ -1974,7 +1976,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.64  1999-11-30 10:40:52  peter
+  Revision 1.65  1999-12-12 12:57:59  peter
+    * allow para+offset
+
+  Revision 1.64  1999/11/30 10:40:52  peter
     + ttype, tsymlist
     + ttype, tsymlist
 
 
   Revision 1.63  1999/11/17 17:05:03  pierre
   Revision 1.63  1999/11/17 17:05:03  pierre