]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
a68: fix function type in a68_lower_revelation_ludes
authorJose E. Marchesi <jemarch@gnu.org>
Thu, 5 Feb 2026 10:34:01 +0000 (11:34 +0100)
committerJose E. Marchesi <jemarch@gnu.org>
Thu, 5 Feb 2026 10:34:37 +0000 (11:34 +0100)
Turns out that:

   build_function_type_list (void_type_node, void_type_node, NULL_TREE)

doesn't do what I thought it does.  It resulted in a function type
getting two `void' arguments, and this was triggering a warning in LTO
mode.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
gcc/algol68/ChangeLog

* a68-low-clauses.cc (a68_lower_revelation_ludes): Fix function
type for fdecl.

gcc/algol68/a68-low-clauses.cc

index 26607d7f42297c2bc4d294180c9ad9d153b6828c..bdd857b7e0b94bb9d7cfcddb4d6dbaada5efd044 100644 (file)
@@ -1407,9 +1407,9 @@ a68_lower_revelation_ludes (NODE_T *p, bool prelude)
 
          tree fdecl = build_decl (UNKNOWN_LOCATION, FUNCTION_DECL,
                                   get_identifier (fname),
-                                  build_function_type_list (void_type_node,
-                                                            void_type_node,
-                                                            NULL_TREE));
+                                  build_function_type (void_type_node,
+                                                       void_list_node));
+
          DECL_EXTERNAL (fdecl) = 1;
          TREE_PUBLIC (fdecl) = 1;
          a68_add_decl (fdecl);