[gcc r12-6291] [Ada] Simplify repeated calls in printing of GNAT AST

Pierre-Marie de Rodat pmderodat@gcc.gnu.org
Thu Jan 6 17:12:56 GMT 2022


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

commit r12-6291-g2a3652640b612c1e7619dfa10c096f3adc750b41
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Fri Dec 3 13:23:36 2021 +0100

    [Ada] Simplify repeated calls in printing of GNAT AST
    
    gcc/ada/
    
            * treepr.adb (Visit_Node): Simplify repeated call to
            Next_Entity.

Diff:
---
 gcc/ada/treepr.adb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/ada/treepr.adb b/gcc/ada/treepr.adb
index f317d8fd660..b6a652545ef 100644
--- a/gcc/ada/treepr.adb
+++ b/gcc/ada/treepr.adb
@@ -2305,8 +2305,8 @@ package body Treepr is
             begin
                Nod := N;
                while Present (Nod) loop
-                  Visit_Descendant (Union_Id (Next_Entity (Nod)));
                   Next_Entity (Nod);
+                  Visit_Descendant (Union_Id (Nod));
                end loop;
             end;
          end if;


More information about the Gcc-cvs mailing list