1
0
mirror of https://github.com/postgres/postgres.git synced 2026-10-23 13:29:09 +03:00

Fix alignas placement in GinTuple

Commit bad8829872 added an alignas specifier, and placed it in the
middle of the declaration, unlike most existing uses, possibly to
avoid the indentation problem recently fixed in commit 884f82ae26.
This placement is valid in C but not in C++, which requires it to be
at the beginning.  This results in a warning in g++ and an error in
clang++.  Fix by moving it accordingly.
This commit is contained in:
Peter Eisentraut
2026-09-23 09:16:33 +02:00
parent dca73f7dd0
commit 9bfdcfbfcf

View File

@@ -33,7 +33,7 @@ typedef struct GinTuple
* The key value is accessed in place, so it must be aligned well enough
* for any key type.
*/
char alignas(MAXIMUM_ALIGNOF) data[FLEXIBLE_ARRAY_MEMBER];
alignas(MAXIMUM_ALIGNOF) char data[FLEXIBLE_ARRAY_MEMBER];
} GinTuple;
static inline ItemPointer