https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113811
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- In case __n is the minimum signed integer and __k is -1 the division would also trap ;) So yes, they should be unsigned.
rguenth at gcc dot gnu.org via Gcc-bugs Thu, 08 Feb 2024 01:13:41 -0800
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113811
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- In case __n is the minimum signed integer and __k is -1 the division would also trap ;) So yes, they should be unsigned.