Re: [GSOC][PATCH] apply: address -Wsign-comparison warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Zejun Zhao <jelly.zhao.42@xxxxxxxxx> writes:

> Thank you for explaining. I'll separate the desired changes from this patch to 
> another since the topic will be different.
>
> By the way, should we remove the idea from the microproject list now that we 
> may not want it?

It is not like we do not want it, I think.

If you read https://git.github.io/SoC-2025-Microprojects/ (the first
entry) carefully, it does not say "find anything that -Wsign-compare
warns about and squelch the warning by using widest type common
among the quantities involved in the expression the compiler warns
about" at all.  Most specifically, it does *not* tell you to achieve
it "by using widest type".  You would squelch the warning using the
most appropriate type, which may not be the widest one.  In the case
we discussed in this thread, it was line number whose type was the
platform natural integer, but mixed up with other size_t things that
caused the compiler warning.  Blindly using size_t to squelch it may
not be what we want, but that does not mean we do not want to
squelch it by doing something else (like, by not bringing "size_t"
quantity into the picture).




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux