Browse Source

* symbol_end for typed consts

git-svn-id: trunk@2269 -
florian 19 years ago
parent
commit
44fb1f1db8
1 changed files with 20 additions and 10 deletions
  1. 20 10
      compiler/ptconst.pas

+ 20 - 10
compiler/ptconst.pas

@@ -85,18 +85,19 @@ implementation
          storefilepos : tfileposinfo;
          storefilepos : tfileposinfo;
          cursectype : TAsmSectionType;
          cursectype : TAsmSectionType;
          cural : tasmlist;
          cural : tasmlist;
+         sizelabel : tasmlabel;
 
 
          procedure check_range(def:torddef);
          procedure check_range(def:torddef);
-         begin
-            if ((tordconstnode(p).value>def.high) or
-                (tordconstnode(p).value<def.low)) then
-              begin
-                 if (cs_check_range in aktlocalswitches) then
-                   Message(parser_e_range_check_error)
-                 else
-                   Message(parser_w_range_check_error);
-              end;
-         end;
+           begin
+              if ((tordconstnode(p).value>def.high) or
+                  (tordconstnode(p).value<def.low)) then
+                begin
+                   if (cs_check_range in aktlocalswitches) then
+                     Message(parser_e_range_check_error)
+                   else
+                     Message(parser_w_range_check_error);
+                end;
+           end;
 
 
       begin
       begin
          old_block_type:=block_type;
          old_block_type:=block_type;
@@ -1022,6 +1023,15 @@ implementation
          end;
          end;
       myexit:
       myexit:
          block_type:=old_block_type;
          block_type:=old_block_type;
+
+         if assigned(sym) then
+           begin
+             storefilepos:=aktfilepos;
+             aktfilepos:=sym.fileinfo;
+
+             asmlist[cural].concat(tai_symbol_end.Createname(sym.mangledname));
+             aktfilepos:=storefilepos;
+           end;
       end;
       end;
 {$ifdef fpc}
 {$ifdef fpc}
   {$maxfpuregisters default}
   {$maxfpuregisters default}