[PATCH v2 32/65] MMIX: use is_whitespace()
Hans-Peter Nilsson
hp@bitrange.com
Fri Jan 31 07:05:20 GMT 2025
On Fri, 31 Jan 2025, Jan Beulich wrote:
> On 31.01.2025 07:33, Hans-Peter Nilsson wrote:
> > On Mon, 27 Jan 2025, Jan Beulich wrote:
> >> Convert open-coded checks as well as ISSPACE() uses. At the same time
> >> use is_end_of_stmt() instead of open-coded checks; do the conversion
> >> even when not adjacent to code being modified anyway to cover all cases
> >> where the is_end_of_line[] index was wrongly cast from plain char (which
> >> can be signed) to unsigned int.
> >
> > Where is the "wrongly cast" to which you refer?
> >
> > I see no more "wrongly casts" before the patch than after,
> > considering that is_whitespace is doing such a cast. But, I
> > could easily have missed a spot.
>
> Take this example:
>
> while (*s && ISSPACE (*s) && ! is_end_of_line[(unsigned int) *s])
Oh boy, all those "unsigned int" should have been "unsigned
char". Doh! Thanks.
brgds, H-P
More information about the Binutils
mailing list