https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77886

--- Comment #2 from Marc Mutz <marc.mutz at kdab dot com> ---
It's worse than I thought:

    int n = (count + 7) / 8;
    switch (count & 0x07)
    {
    case 0: do { *dest++ = value;
        // fall through
    case 7:      *dest++ = value;
        // fall through
    case 6:      *dest++ = value;
        // fall through
    case 5:      *dest++ = value;
        // fall through
    case 4:      *dest++ = value;
        // fall through
    case 3:      *dest++ = value;
        // fall through
    case 2:      *dest++ = value;
        // fall through
    case 1:      *dest++ = value;
    } while (--n > 0);
    }

still warns.

The only way to avoid the warning is to use [[fallthrough]] at the end of each
line.

Reply via email to