[patch] Use unsigned constants for ICMP6 filters [BZ #22489]

DJ Delorie dj@redhat.com
Sat Apr 25 17:15:23 GMT 2020


Andreas Schwab <schwab@linux-m68k.org> writes:
> That explanation doesn't make sense.  This has nothing to do with
> signedness of bitfields, it is about shifting a value out of its range.

The struct has this:

    uint32_t icmp6_filt[8];

It's not a "gcc bitfield" it's an "icmp filter bitfield"

The logic in the test case boils down to:

  (uint32_t) icmp6_filt[]  &=  (int) -65

GCC complains that -65 doesn't fit in "uint32_t" and was converted to
(unsigned) 0xffffffbf.



More information about the Libc-alpha mailing list