On Mon, 2020-08-03 at 20:45 +0200, Heinrich Schuchardt wrote:
> On 03.08.20 17:56, Domingo Alvarez Duarte wrote:

> [...]
> > +#if defined(GLP_NO_MEMORY_POOL)
> > +#define xrealloc(ptr, n, size) realloc(ptr, n*size)
> > +#define trealloc(ptr, n, type) ((type *)realloc(ptr,
> > n*sizeof(type)))


You need to protect macro arguments by parentheses like this:

+#define xrealloc(ptr, n, size) realloc(ptr, (n)*(size))

because n and size can be expressions.

Reply via email to