فهرست منبع

Use FPC_HAS_SYSTEMS_INTERRUPT_TABLE conditional
undefined for now as long as
systems_interrupt_table set
defined in systems unit is empty.
This removes several warnings from compiler compilation.

git-svn-id: trunk@17871 -

pierre 14 سال پیش
والد
کامیت
4d50a95320
5فایلهای تغییر یافته به همراه22 افزوده شده و 0 حذف شده
  1. 7 0
      compiler/fpcdefs.inc
  2. 2 0
      compiler/pdecsub.pas
  3. 2 0
      compiler/pmodules.pas
  4. 4 0
      compiler/symdef.pas
  5. 7 0
      compiler/systems.pas

+ 7 - 0
compiler/fpcdefs.inc

@@ -28,6 +28,13 @@
 
 {$define USEEXCEPT}
 
+{ If anyone wants to use interrupt for
+  a specific target, add a
+  $define FPC_HAS_SYSTEMS_INTERRUPT_TABLE
+  to fpcdefs.inc to reactivate
+  the corresponding code }
+{$undef FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
+
 { This fake CPU is used to allow incorporation of globtype unit
   into utils/ppudump without any CPU specific code PM }
 {$ifdef generic_cpu}

+ 2 - 0
compiler/pdecsub.pas

@@ -1626,6 +1626,7 @@ begin
   if pd.parast.symtablelevel>normal_function_level then
     Message(parser_e_dont_nest_interrupt);
 
+{$ifdef FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
   if target_info.system in systems_interrupt_table then
     begin
       if token<>_SEMICOLON then
@@ -1635,6 +1636,7 @@ begin
           Tprocdef(pd).interruptvector:=v.uvalue;
         end;
     end;
+{$endif FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
 end;
 
 procedure pd_abstract(pd:tabstractprocdef);

+ 2 - 0
compiler/pmodules.pas

@@ -2347,8 +2347,10 @@ implementation
          InsertWideInitsTablesTable;
          InsertMemorySizes;
 
+{$ifdef FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
          if target_info.system in systems_interrupt_table then
            InsertInterruptTable;
+{$endif FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
 
          { Insert symbol to resource info }
          InsertResourceInfo(resources_used);

+ 4 - 0
compiler/symdef.pas

@@ -3544,8 +3544,10 @@ implementation
          else
            import_name:=nil;
          import_nr:=ppufile.getword;
+{$ifdef FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
          if target_info.system in systems_interrupt_table then
            interruptvector:=ppufile.getlongint;
+{$endif FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
          if (po_msgint in procoptions) then
            messageinf.i:=ppufile.getlongint;
          if (po_msgstr in procoptions) then
@@ -3682,8 +3684,10 @@ implementation
          if po_has_importname in procoptions then
            ppufile.putstring(import_name^);
          ppufile.putword(import_nr);
+{$ifdef FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
          if target_info.system in systems_interrupt_table then
            ppufile.putlongint(interruptvector);
+{$endif FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
          if (po_msgint in procoptions) then
            ppufile.putlongint(messageinf.i);
          if (po_msgstr in procoptions) then

+ 7 - 0
compiler/systems.pas

@@ -271,7 +271,14 @@ interface
 
        systems_internal_sysinit = [system_i386_linux,system_i386_win32];
 
+       {$ifdef FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
+       { If anyone wants to use interrupt for
+         a specific target, add a
+         $define FPC_HAS_SYSTEMS_INTERRUPT_TABLE
+         to fpcdefs.inc to reactivate
+         the corresponding code }
        systems_interrupt_table = [{system_arm_embedded}];
+       {$endif FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
 
        { all systems for which istack must be at a 16 byte boundary
          when calling a function }