bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

xsize and flexmember


From: Marc Nieper-Wißkirchen
Subject: xsize and flexmember
Date: Wed, 29 Apr 2020 21:29:35 +0200

The flexmember module provides the macro FLEXSIZEOF to calculate an
appropriate size to malloc a struct with a flexible array member.

Overflow is reported differently than with the xsize module, which
provides size_overflow_p.

It would be great if the flexmember exported another macro, say
XFLEXSIZEOF, which returned SIZE_MAX in case of arithmetic overflow.

--
Marc



reply via email to

[Prev in Thread] Current Thread [Next in Thread]