Hans-Peter Nilsson <[email protected]> writes:
> On Thu, 10 Sep 2026, Richard Sandiford wrote:
>> Building mmix with config-list.mk failed due to:
>> 
>> .../gcc/except.cc: In function ?void
>> expand_dw2_landing_pad_for_region(eh_region)?:
>> .../gcc/except.cc:975:36: error: comparison of integer expressions of
>> different signedness: ?int? and ?unsigned int? [-Werror=sign-compare]
>>   975 |       if (EH_RETURN_DATA_REGNO (0) != INVALID_REGNUM)
>> .../gcc/except.cc:985:36: error: comparison of integer expressions of
>> different signedness: ?int? and ?unsigned int? [-Werror=sign-compare]
>>   985 |       if (EH_RETURN_DATA_REGNO (1) != INVALID_REGNUM)
>> 
>> That is, target-independent code expects EH_RETURN_DATA_REGNO
>> to be unsigned.
>
> Whoops.  Caused by a recent change?

Not sure TBH.  I've not been active lately and so it's been a while
since I've used config-list.mk.  There again, I think I just worked
around the build failures last time, rather than trying to fix them,

Thanks for the review.

Richard

>> Changing mmix_eh_return_data_regno required various regno variables
>> in mmix.cc to become unsigned, but other code is still written for
>> signed regnos.
>
> Hm, not sure why.  Manybe because yet other code requires 
> signedness.  Anyway...
>
>>  Rather than go down the rabbit hole of making
>> everything consistent, it seemed easiest to limit the scope of
>> each variable.
>> 
>> Tested with config-list.mk.  OK to install?
>
> Ok, thanks!
>
>> Richard
>> 
>> 
>> gcc/
>>      * config/mmix/mmix-protos.h (mmix_eh_return_data_regno): Return
>>      unsigned int rather than int.
>>      * config/mmix/mmix.cc (mmix_eh_return_data_regno): Likewise.
>>      (mmix_initial_elimination_offset): Limit regno variables to
>>      their for loops and use unsigned regnos for EH data queries.
>>      (mmix_use_simple_return): Likewise.
>>      (mmix_expand_prologue): Likewise.
>>      (mmix_expand_epilogue): Likewise.
>
> brgds, H-P

Reply via email to