Explorar el Código

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

git-svn-id: trunk@12931 -
Jonas Maebe hace 16 años
padre
commit
c04e9e36f7
Se han modificado 1 ficheros con 5 adiciones y 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;