Re: alignas (C11)

From: Andres Freund <andres(at)anarazel(dot)de>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: alignas (C11)
Date: 2025-11-12 14:02:42
Message-ID: l2ihaqt357ghh6v6fhjppzdzcyfyl2ephu3wgy3g7wph4c77j5@tsegpcc2wf4o
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2025-11-12 12:39:19 +0100, Peter Eisentraut wrote:
> - You cannot use alignas on a typedef. So some uses of the attribute
> pg_attribute_aligned() like for PgAioUringContext or the whole int128
> business cannot be converted directly. The solution for cases like
> PgAioUringContext could be to move the alignas into the struct, but I
> haven't studied this code closely enough, so I'm leaving it. For int128,
> there is no straightforward solution, so I'm also leaving that as is.

Maybe I'm confused, but the aligned attribute for PgAioUringContext is on the
struct, not the typedef, no?

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2025-11-12 14:15:20 Re: Extended test coverage and docs for SSL passphrase commands
Previous Message John Naylor 2025-11-12 13:57:49 Re: tuple radix sort