public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-6000] [Ada] Avoid reanalysis of malformed dependency relations
@ 2020-12-14 15:53 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2020-12-14 15:53 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2a1a3fc67f4ce399992ff83d97f76c2682dcb38f

commit r11-6000-g2a1a3fc67f4ce399992ff83d97f76c2682dcb38f
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Mon Nov 16 21:40:56 2020 +0100

    [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:
---
 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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-14 15:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 15:53 [gcc r11-6000] [Ada] Avoid reanalysis of malformed dependency relations Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).