aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2020-11-16 21:40:56 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2020-12-14 10:51:49 -0500
commit2a1a3fc67f4ce399992ff83d97f76c2682dcb38f (patch)
treee7338eebe08bacc244112f50aad53bb05d153add
parentd494f9f037b7c24aeeaee5cd2e84fc9863728086 (diff)
downloadgcc-2a1a3fc67f4ce399992ff83d97f76c2682dcb38f.zip
gcc-2a1a3fc67f4ce399992ff83d97f76c2682dcb38f.tar.gz
gcc-2a1a3fc67f4ce399992ff83d97f76c2682dcb38f.tar.bz2
[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.
-rw-r--r--gcc/ada/sem_prag.adb6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 0a8e99b..fe22510 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);