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

--- Comment #8 from cagney at sourceware dot org ---
@Pinski I've still waiting for a coherent argument as to why the original code
is undefined.

Like I said, this is a common coding idiom. .ptr and .len define a slice of a
larger buffer.  And at no point do these two operations put those fields out of
the bounds of that buffer:
        buf->len--;
        buf->ptr++;
If I were to shuffle the order, then we'd be getting on thin ice, but even
then, as as been pointed out, it just needs to be fixed on when using CLANG.

Demanding end users change their code requires a strong coherent argument - for
instance there's clear logic behind the need to set .len before first .ptr
dereference - I'm not seeing that here.

@uecker thanks for looking at this

Reply via email to