Browse Source

Reintegration of Custom Attributes branch by Joost van der Sluis with patches reworked by Svetozar Belic [patch 3/3]

Added FPC_REQUIRES_PROPER_ALIGNMENT to TUnitInfo definition. Added FPC_HAS_EXTENDED_RTTI define.

git-svn-id: trunk@42358 -
svenbarth 6 years ago
parent
commit
84848df18d
3 changed files with 8 additions and 3 deletions
  1. 0 2
      compiler/ngenutil.pas
  2. 3 0
      compiler/options.pas
  3. 5 1
      rtl/objpas/typinfo.pp

+ 0 - 2
compiler/ngenutil.pas

@@ -43,8 +43,6 @@ interface
     end;
     pinitfinalentry = ^tinitfinalentry;
 
-    { tnodeutils }
-
     tnodeutils = class
       class function call_fail_node:tnode; virtual;
       class function initialize_data_node(p:tnode; force: boolean):tnode; virtual;

+ 3 - 0
compiler/options.pas

@@ -3263,6 +3263,9 @@ begin
     else
       undef_system_macro('FPC_HAS_WINLIKERESOURCES');
 
+  { RTTI with unitinfo }
+  def_system_macro('FPC_HAS_UNIT_RTTI');
+
   { Features }
   case target_info.system of
     system_arm_gba:

+ 5 - 1
rtl/objpas/typinfo.pp

@@ -231,7 +231,11 @@ unit TypInfo;
 
 {$PACKRECORDS 1}
       PUnitInfo = ^TUnitInfo;
-      TUnitInfo = packed record
+      TUnitInfo =
+{$ifndef FPC_REQUIRES_PROPER_ALIGNMENT}
+      packed
+{$endif FPC_REQUIRES_PROPER_ALIGNMENT}
+      record
         UnitOptions: TRTTIUnitOptions;
         UnitName: shortstring;
       end;