Преглед изворни кода

Merged revisions 2263,2269 via svnmerge from
http://[email protected]/svn/fpc/trunk

........
r2263 | peter | 2006-01-12 07:59:43 +0100 (Thu, 12 Jan 2006) | 2 lines

* support FPCDATE include

........
r2269 | florian | 2006-01-12 21:38:22 +0100 (Thu, 12 Jan 2006) | 2 lines

* symbol_end for typed consts

........

git-svn-id: branches/fixes_2_0@2308 -

peter пре 19 година
родитељ
комит
e07583b654
2 измењених фајлова са 23 додато и 10 уклоњено
  1. 20 10
      compiler/ptconst.pas
  2. 3 0
      compiler/scanner.pas

+ 20 - 10
compiler/ptconst.pas

@@ -84,18 +84,19 @@ implementation
          error     : boolean;
          old_block_type : tblock_type;
          storefilepos : tfileposinfo;
+         sizelabel : tasmlabel;
 
          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
          old_block_type:=block_type;
@@ -1086,6 +1087,15 @@ implementation
          end;
       myexit:
          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;
 {$ifdef fpc}
   {$maxfpuregisters default}

+ 3 - 0
compiler/scanner.pas

@@ -1451,6 +1451,9 @@ compile time variables as the old format (0/1), continue to work.
            else
             if hs='FPCVERSION' then
              hs:=version_string
+           else
+            if hs='FPCDATE' then
+             hs:=date_string
            else
             if hs='FPCTARGET' then
              hs:=target_cpu_string