Explorar o código

* set alignment for 0-byte sized entities to 1 instead of to 0

git-svn-id: trunk@12931 -
Jonas Maebe %!s(int64=16) %!d(string=hai) anos
pai
achega
c04e9e36f7
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      compiler/symdef.pas

+ 5 - 0
compiler/symdef.pas

@@ -1069,6 +1069,11 @@ implementation
       begin
          { natural alignment by default }
          alignment:=size_2_align(savesize);
+         { can happen if savesize = 0, e.g. for voiddef or
+           an empty record
+         }
+         if (alignment=0) then
+           alignment:=1;
       end;