| 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 15:17:19 |
| Message-ID: | lsgnps74ictxtm5karcobenxtt5rvoylvbvx7ja6r5rjcund7v@owxqgv7gisns |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On 2025-11-12 16:09:14 +0100, Peter Eisentraut wrote:
> 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.
Argh, why couldn't C copy the C++ rules for this :(.
Just moving it to completion_lock would be fine though...
Greetings,
Andres Freund
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Manni Wood | 2025-11-12 15:26:20 | Re: [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement |
| Previous Message | Peter Eisentraut | 2025-11-12 15:09:14 | Re: alignas (C11) |