https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93582
Adam Jackson <ajax at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ajax at redhat dot com
--- Comment #5 from Adam Jackson <ajax at redhat dot com> ---
(In reply to Martin Sebor from comment #4)
> It seems like the reporter might be conflating the forming of a past-the-end
> pointer (what the GRABEXT macro does) with dereferencing that pointer (the
> use of the -> operator with the result).
I'm not conflating it, I'm pretty sure the whole point of computing that
address
is to dereference it because that's where the data I want is. The caller is
doing somemthing of the form:
struct image {
int w, h, bpp;
// unsigned char pixels[];
};
struct image *i = malloc(sizeof(*i) + w * h * bpp);
This is not uncommon in code older than zero-length arrays.