]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix ancient typo in process_decls
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 11 Oct 2024 20:40:29 +0000 (22:40 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 4 Nov 2024 15:57:59 +0000 (16:57 +0100)
It has gone unnoticed for decades because it changes nothing in practice.

gcc/ada/ChangeLog:

* gcc-interface/trans.cc (process_decls): Remove tests on Nkind that
contain a typo and would be redundant if written correctly.

gcc/ada/gcc-interface/trans.cc

index 5f8a18eebb7228f8e9cc1b084cc5e8dd70c9ab8c..a27804b91b8f0c2be083ef3f29960eb6a51bbf51 100644 (file)
@@ -9765,9 +9765,7 @@ process_decls (List_Id gnat_decls, List_Id gnat_decls2,
          {
            /* For package specs, we recurse inside the declarations,
               thus taking the two pass approach inside the boundary.  */
-           if (Nkind (gnat_decl) == N_Package_Declaration
-               && (Nkind (Specification (gnat_decl)
-                          == N_Package_Specification)))
+           if (Nkind (gnat_decl) == N_Package_Declaration)
              process_decls (Visible_Declarations (Specification (gnat_decl)),
                             Private_Declarations (Specification (gnat_decl)),
                             true, false);
@@ -9853,9 +9851,7 @@ process_decls (List_Id gnat_decls, List_Id gnat_decls2,
                || Nkind (gnat_decl) == N_Protected_Body_Stub)
              add_stmt (gnat_to_gnu (gnat_decl));
 
-           else if (Nkind (gnat_decl) == N_Package_Declaration
-                    && (Nkind (Specification (gnat_decl)
-                               == N_Package_Specification)))
+           else if (Nkind (gnat_decl) == N_Package_Declaration)
              process_decls (Visible_Declarations (Specification (gnat_decl)),
                             Private_Declarations (Specification (gnat_decl)),
                             false, true);