Re: [PATCH 0/5] allow -1 and compares in bitwise types

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

 



On 6/27/22 12:05, Luc Van Oostenryck wrote:
Allow using -1 and compare operators with bitwise types

This series is an experiment for allowing constants like
-1 or ~0 with bitwise types, as well as using compares
on them.

Will these changes cause sparse to stop complaining about
the following expression?

	cpu_to_le32(1) < cpu_to_le32(2)

Shouldn't sparse keep complaining about the above expression?

@Bart,
Is there a good reason why the macro compares against 1 and
not against 0?

Maybe to prevent that gcc or clang issues the following
warning: "warning: comparison of unsigned expression in ‘< 0’
is always false"?

Thanks,

Bart.



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux