]> Savannah Git Hosting - gnulib.git/commit
obstack: Avoid undefined behaviour.
authorBruno Haible <bruno@clisp.org>
Fri, 1 Dec 2023 18:39:26 +0000 (19:39 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 18 Jan 2024 08:12:37 +0000 (09:12 +0100)
commitba2e17db6f6f80f01977525cb9cb0d04518be163
tree308f2a1d2c09ff832eab35910332c6ebb4ea4e27
parent3892debca38284b7b9f01c0cc3cef32e1ef26a7e
obstack: Avoid undefined behaviour.

Reported by Alexey Palienko <Alexey.Palienko@cma.se> in
<https://lists.gnu.org/archive/html/bug-m4/2023-02/msg00000.html>.

* lib/obstack.in.h: Include <stdint.h>.
(__BPTR_ALIGN): Remove macro.
(__PTR_ALIGN): For the optimized case, compute the alignment through
uintptr_t, instead of computing NULL + something.
ChangeLog
lib/obstack.h