diff gcc/ada/par-ch2.adb @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line diff
--- a/gcc/ada/par-ch2.adb	Thu Oct 25 07:37:49 2018 +0900
+++ b/gcc/ada/par-ch2.adb	Thu Feb 13 11:34:05 2020 +0900
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2018, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2019, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -247,11 +247,8 @@
 
       --  Local variables
 
-      Interface_Check_Required : Boolean := False;
-      --  Set True if check of pragma INTERFACE is required
-
       Import_Check_Required : Boolean := False;
-      --  Set True if check of pragma IMPORT is required
+      --  Set True if check of pragma IMPORT or INTERFACE is required
 
       Arg_Count : Nat := 0;
       --  Number of argument associations processed
@@ -295,11 +292,10 @@
       --  See if special INTERFACE/IMPORT check is required
 
       if SIS_Entry_Active then
-         Interface_Check_Required := (Prag_Name = Name_Interface);
-         Import_Check_Required    := (Prag_Name = Name_Import);
+         Import_Check_Required :=
+           (Prag_Name = Name_Import) or else (Prag_Name = Name_Interface);
       else
-         Interface_Check_Required := False;
-         Import_Check_Required    := False;
+         Import_Check_Required := False;
       end if;
 
       --  Set global to indicate if we are within a Depends pragma
@@ -331,9 +327,7 @@
                  Nam_In (Prag_Name, Name_Restriction_Warnings,
                                     Name_Restrictions));
 
-            if Arg_Count = 2
-              and then (Interface_Check_Required or else Import_Check_Required)
-            then
+            if Arg_Count = 2 and then Import_Check_Required then
                --  Here is where we cancel the SIS active status if this pragma
                --  supplies a body for the currently active subprogram spec.