From: Piotr Trojanek Date: Mon, 16 Nov 2020 20:40:56 +0000 (+0100) Subject: [Ada] Avoid reanalysis of malformed dependency relations X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2a1a3fc67f4ce399992ff83d97f76c2682dcb38f;p=gcc.git [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. --- 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);