public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/autopar_devel] [Ada] Simplify iteration over formal parameters for aliasing error
@ 2020-08-22 22:23 Giuliano Belinassi
  0 siblings, 0 replies; only message in thread
From: Giuliano Belinassi @ 2020-08-22 22:23 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f9e02100719ec480367f5a79c616420aa7ac5263

commit f9e02100719ec480367f5a79c616420aa7ac5263
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Fri Mar 13 15:43:54 2020 +0100

    [Ada] Simplify iteration over formal parameters for aliasing error
    
    2020-06-11  Piotr Trojanek  <trojanek@adacore.com>
    
    gcc/ada/
    
            * sem_warn.adb (Warn_On_Overlapping_Actuals): Add label to the
            outer loop and use it in the exit statement.

Diff:
---
 gcc/ada/sem_warn.adb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
index a3195a19369..ca019ef9d31 100644
--- a/gcc/ada/sem_warn.adb
+++ b/gcc/ada/sem_warn.adb
@@ -1835,7 +1835,7 @@ package body Sem_Warn is
          elsif Nkind (Pref) = N_Explicit_Dereference then
             return True;
 
-            --  If prefix is itself a component reference or slice check prefix
+         --  If prefix is itself a component reference or slice check prefix
 
          elsif Nkind (Pref) = N_Slice
            or else Nkind (Pref) = N_Indexed_Component
@@ -3707,7 +3707,7 @@ package body Sem_Warn is
 
       Warn_Only := True;
       Form1 := First_Formal (Subp);
-      while Present (Form1) loop
+      Set_Warn_Only : while Present (Form1) loop
          Form2 := Next_Formal (Form1);
          while Present (Form2) loop
             if Is_Elementary_Type (Etype (Form1))
@@ -3716,14 +3716,14 @@ package body Sem_Warn is
               and then Ekind (Form2) /= E_In_Parameter
             then
                Warn_Only := False;
-               exit;
+               exit Set_Warn_Only;
             end if;
 
             Next_Formal (Form2);
          end loop;
 
          Next_Formal (Form1);
-      end loop;
+      end loop Set_Warn_Only;
 
       --  Exclude calls rewritten as enumeration literals


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

only message in thread, other threads:[~2020-08-22 22:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-22 22:23 [gcc/devel/autopar_devel] [Ada] Simplify iteration over formal parameters for aliasing error Giuliano Belinassi

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).