Browse Source

allow gettting the address of read-only typedconsts

peter 20 years ago
parent
commit
f11458e457
1 changed files with 6 additions and 2 deletions
  1. 6 2
      compiler/htypechk.pas

+ 6 - 2
compiler/htypechk.pas

@@ -1148,7 +1148,8 @@ implementation
                      end;
                      end;
                    typedconstsym :
                    typedconstsym :
                      begin
                      begin
-                       if ttypedconstsym(tloadnode(hp).symtableentry).is_writable then
+                       if ttypedconstsym(tloadnode(hp).symtableentry).is_writable or
+                          (valid_addr in opts) then
                         result:=true
                         result:=true
                        else
                        else
                         CGMessagePos(hp.fileinfo,type_e_no_assign_to_const);
                         CGMessagePos(hp.fileinfo,type_e_no_assign_to_const);
@@ -2062,7 +2063,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.123  2005-04-08 15:18:32  peter
+  Revision 1.124  2005-04-25 08:59:07  peter
+  allow gettting the address of read-only typedconsts
+
+  Revision 1.123  2005/04/08 15:18:32  peter
   support string[index] for const/var assignment
   support string[index] for const/var assignment
 
 
   Revision 1.122  2005/04/01 07:12:29  marco
   Revision 1.122  2005/04/01 07:12:29  marco