The p field in struct isl_upoly_rec is meant to be a flexible array member,
but this was only introduced in C99 and so we were using a slightly
different construct. However, we already assume C99 (in particular,
designated initializers) in the rest of the code and recent versions
of clang complain about possible array out of bounds accesses when
we don't use a flexible array member.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_assert(ctx, size >= 0, return NULL);
rec = isl_calloc(ctx, struct isl_upoly_rec,
sizeof(struct isl_upoly_rec) +
isl_assert(ctx, size >= 0, return NULL);
rec = isl_calloc(ctx, struct isl_upoly_rec,
sizeof(struct isl_upoly_rec) +
- (size - 1) * sizeof(struct isl_upoly *));
+ size * sizeof(struct isl_upoly *));
- struct isl_upoly *p[1];
};
struct isl_qpolynomial {
};
struct isl_qpolynomial {