[COMMITTED] a68: fix function type in a68_lower_revelation_ludes

Jose E. Marchesi jemarch@gnu.org
Thu Feb 5 10:35:26 GMT 2026


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 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/algol68/a68-low-clauses.cc b/gcc/algol68/a68-low-clauses.cc
index 26607d7f422..bdd857b7e0b 100644
--- a/gcc/algol68/a68-low-clauses.cc
+++ b/gcc/algol68/a68-low-clauses.cc
@@ -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);
-- 
2.39.5



More information about the Algol68 mailing list