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

commit r16-7315-gbefd9c02eb70ede5185e531684c11ed6b6f56c0d
Author: Jose E. Marchesi <[email protected]>
Date:   Thu Feb 5 11:34:01 2026 +0100

    a68: fix function type in a68_lower_revelation_ludes
    
    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 <[email protected]>
    
    gcc/algol68/ChangeLog
    
            * a68-low-clauses.cc (a68_lower_revelation_ludes): Fix function
            type for fdecl.

Diff:
---
 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 26607d7f4229..bdd857b7e0b9 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);

Reply via email to