2
0
Эх сурвалжийг харах

* error if calling interrupt procedure

pierre 26 жил өмнө
parent
commit
281c77f2b1

+ 2 - 0
compiler/errore.msg

@@ -1147,6 +1147,8 @@ cg_e_unable_inline_procvar=E_Procvar calls can't be inline.
 % A procedure with a procedural variable call cannot be inlined.
 % A procedure with a procedural variable call cannot be inlined.
 cg_e_no_code_for_inline_stored=E_No code for inline procedure stored
 cg_e_no_code_for_inline_stored=E_No code for inline procedure stored
 % The compiler couldn't store code for the inline procedure.
 % The compiler couldn't store code for the inline procedure.
+cg_e_no_call_to_interrupt=E_Direct call of interrupt procedure $1 is not possible
+% You can not call an interrupt procedure directly from FPC code
 cg_e_can_access_element_zero=E_Element zero of an ansi/wide- or longstring can't be accessed, use (set)length instead
 cg_e_can_access_element_zero=E_Element zero of an ansi/wide- or longstring can't be accessed, use (set)length instead
 % You should use \var{setlength} to set the length of an ansi/wide/longstring
 % You should use \var{setlength} to set the length of an ansi/wide/longstring
 % and \var{length} to get the length of such kinf of string
 % and \var{length} to get the length of such kinf of string

+ 6 - 2
compiler/tccal.pas

@@ -1045,6 +1045,8 @@ implementation
               else
               else
                 procinfo^.flags:=procinfo^.flags or pi_do_call;
                 procinfo^.flags:=procinfo^.flags or pi_do_call;
 
 
+              if (po_interrupt in p^.procdefinition^.procoptions) then
+                CGmessage1(cg_e_no_call_to_interrupt,p^.symtableprocentry^.name);
               { work trough all parameters to insert the type conversions }
               { work trough all parameters to insert the type conversions }
               { !!! done now after internproc !! (PM) }
               { !!! done now after internproc !! (PM) }
               if assigned(p^.left) then
               if assigned(p^.left) then
@@ -1222,7 +1224,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.66  1999-09-27 23:45:00  peter
+  Revision 1.67  1999-10-12 15:50:54  pierre
+   * error if calling interrupt procedure
+
+  Revision 1.66  1999/09/27 23:45:00  peter
     * procinfo is now a pointer
     * procinfo is now a pointer
     * support for result setting in sub procedure
     * support for result setting in sub procedure
 
 
@@ -1479,4 +1484,3 @@ end.
     * splitted pass_1
     * splitted pass_1
 
 
 }
 }
-