Re: alignas (C11)
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2026-01-29T21:19:27Z
Lists: pgsql-hackers
Peter Eisentraut <peter@eisentraut.org> writes: > Well, in C11, alignas is itself a macro (defined to _Alignas). I > suppose not in C++ though. That seems too tricky, though. I went with > your original proposal of disabling the affected typedefs on the > affected platform. That seems safest. These types aren't likely to be > used in extensions anyway, so this should have minimal practical impact. I suspected that we'd have to supply the types as abstract structs per my earlier suggestion, and just found a good reason why: "headerscheck --cplusplus" is failing for me on RHEL8, because it tries to parse all headers under C++. This is blocking progress on another patch, so I went ahead and committed the addition. regards, tom lane
Commits
-
Further fix extended alignment for older g++.
- bd9dfac8b121 19 (unreleased) landed
-
Disable extended alignment uses on older g++
- 6ceef9408c26 19 (unreleased) landed
-
Work around buggy alignas in older g++
- a9bdb63bba8a 19 (unreleased) landed
-
Use C11 alignas in pg_atomic_uint64 definitions
- e7075a3405cc 19 (unreleased) landed
-
C11 alignas instead of unions -- extended alignments
- d4c0f91f7d57 19 (unreleased) landed
-
C11 alignas instead of unions
- 97e04c74bedb 19 (unreleased) landed
-
Add <stdalign.h> to c.h
- 300c8f532478 19 (unreleased) landed