Re: alignas (C11) - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: alignas (C11)
Date
Msg-id 0c246ee5-6d01-4f69-80c4-f5270d4b79fc@eisentraut.org
Whole thread Raw
In response to Re: alignas (C11)  (Andres Freund <andres@anarazel.de>)
Responses Re: alignas (C11)
List pgsql-hackers
On 12.11.25 15:02, Andres Freund wrote:
> 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?

Yes, you're right.  The immediate problem there is that alignas is not 
syntactically valid at all at that position.




pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: libpq OpenSSL and multithreading
Next
From: Andres Freund
Date:
Subject: Re: alignas (C11)