From 2a1a3fc67f4ce399992ff83d97f76c2682dcb38f Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Mon, 16 Nov 2020 21:40:56 +0100 Subject: [PATCH] [Ada] Avoid reanalysis of malformed dependency relations gcc/ada/ * sem_prag.adb (Analyze_Depends_In_Decl_Part): Replace early returns with goto Leave. (Collect_Subprogram_Inputs_Outputs): Fix style in comment. --- gcc/ada/sem_prag.adb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 0a8e99bd10d..fe22510baf5 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -1975,7 +1975,7 @@ package body Sem_Prag is -- clause as this will lead to misleading errors. if Has_Extra_Parentheses (Deps) then - return; + goto Leave; end if; if Present (Component_Associations (Deps)) then @@ -2066,7 +2066,7 @@ package body Sem_Prag is else Error_Msg_N ("malformed dependency relation", Deps); - return; + goto Leave; end if; -- The top level dependency relation is malformed. This is a syntax @@ -30226,7 +30226,7 @@ package body Sem_Prag is Global := Get_Pragma (Subp_Id, Pragma_Refined_Global); -- Subprogram declaration or stand-alone body case, look for pragmas - -- Depends and Global + -- Depends and Global. else Depends := Get_Pragma (Spec_Id, Pragma_Depends); -- 2.30.2