[PATCH] linux: Fix integer overflow warnings when including <sys/mount.h> [BZ #32708]
Cristian Rodríguez
cristian@rodriguez.im
Mon Feb 17 12:52:32 GMT 2025
On Mon, Feb 17, 2025 at 2:57 AM Collin Funk <collin.funk1@gmail.com> wrote:
>
> Using gcc -Wshift-overflow=2 -Wsystem-headers to compile a file
> including <sys/mount.h> will cause a warning since 1 << 31 is undefined
> behavior on platforms where int is 32-bits.
huh. That's pretty bad.. The same problem exists on the kernel
headers. did you send a kernel patch too?
https://github.com/torvalds/linux/blob/0ad2507d5d93f39619fc42372c347d6006b64319/include/uapi/linux/mount.h#L47
More information about the Libc-alpha
mailing list