On 6/1/23 19:39, Dan Carpenter wrote:
It's a false positive because the test is obviously intended for 32-bit longs.
I'm not an expert in compiler development, but I do not understand "obviously intended" in this context. An input literally compares <any unsigned 32-bit> > <max unsigned 64-bit> / 8, which is always false, and so the compiler complains. If "obviously intended" means "the compiler should silently optimize away this check for LP64", I would disagree, and that's why I would like to see the confirmation from LLVM/clang developers. Dmitry