postgres.git / summary / log / commit / refs
commit bd9dfac8b121e67d7dd4a9bfecb1474fe6811927
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Thu Jan 29 21:16:36 2026 +0000
Further fix extended alignment for older g++.
Commit 6ceef9408 was still one brick shy of a load, because it caused
any usage at all of PGIOAlignedBlock or PGAlignedXLogBlock to fail
under older g++. Notably, this broke "headerscheck --cplusplus".
We can permit references to these structs as abstract structs though;
only actual declaration of such a variable needs to be forbidden.
Discussion: https://www.postgresql.org/message-id/3119480.1769189606@sss.pgh.pa.us
src/include/c.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/include/c.h b/src/include/c.h
index 48e4087c09c..c443e75b89f 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -1140,6 +1140,12 @@ typedef struct PGAlignedXLogBlock
alignas(PG_IO_ALIGN_SIZE) char data[XLOG_BLCKSZ];
} PGAlignedXLogBlock;
+#else /* (g++ < 9) */
+
+/* Allow these types to be used as abstract types when using old g++ */
+typedef struct PGIOAlignedBlock PGIOAlignedBlock;
+typedef struct PGAlignedXLogBlock PGAlignedXLogBlock;
+
#endif /* !(g++ < 9) */
/* msb for char */
[parent: de90bb7db1f8]