]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pdp11-aout: Remove invalid conversion and restore build
authorMartin Jambor <mjambor@suse.cz>
Tue, 9 Jun 2026 10:00:26 +0000 (12:00 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Tue, 9 Jun 2026 10:00:29 +0000 (12:00 +0200)
When cross compiling to pdp11-aout, the build has been recently
failing with

  error: invalid conversion from 'int*' to 'unsigned int*'

This patch changes the variable in question to the appropriate type
and fixes the issue (I have not looked at the code beyond that).

Tested by successfully configuring gcc with

  ../src/configure --prefix=/home/mjambor/gcc/mine/inst --enable-languages=c,c++ --enable-checking=yes --disable-bootstrap --disable-multilib --enable-obsolete --target=pdp11-aout

and running make all-host.

gcc/ChangeLog:

2026-06-09  Martin Jambor  <mjambor@suse.cz>

* config/pdp11/pdp11.cc (pdp11_conditional_register_usage): Change i
from int to unsigned int.

gcc/config/pdp11/pdp11.cc

index 7aee804439d0a0ab1c6359a5be78b7e6fba11bc8..f8fe020b2467aa73494b89c0bfb6763365d17dae 100644 (file)
@@ -2209,7 +2209,7 @@ pdp11_function_arg_advance (cumulative_args_t cum_v,
 static void
 pdp11_conditional_register_usage (void)
 {
-  int i;
+  unsigned int i;
   HARD_REG_SET x;
   if (!TARGET_FPU)
     {