[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] flexmember: port to IBM XL C 16.1
From: |
Bruno Haible |
Subject: |
Re: [PATCH] flexmember: port to IBM XL C 16.1 |
Date: |
Sun, 19 Jan 2025 09:39:47 +0100 |
Paul Eggert wrote:
> diff --git a/lib/flexmember.h b/lib/flexmember.h
> index 15ee4f5e28..0168af0eca 100644
> --- a/lib/flexmember.h
> +++ b/lib/flexmember.h
> @@ -32,7 +32,7 @@
> safe in practice even if FLEXIBLE_ARRAY_MEMBER is 1.
> On newer platforms, use _Alignof to get a tighter bound. */
>
> -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
> +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 || defined
> _Alignof
> # define FLEXALIGNOF(type) (sizeof (type) & ~ (sizeof (type) - 1))
> #else
> # define FLEXALIGNOF(type) _Alignof (type)
The comment
On older platforms without _Alignof, use a pessimistic bound that is
safe in practice even if FLEXIBLE_ARRAY_MEMBER is 1.
On newer platforms, use _Alignof to get a tighter bound. */
no longer matches the code.
Bruno