postgres.git / summary / log / commit / refs

commit    9bfdcfbfcf98f819a5f7f35fa3dee25bcf96b3a5
Author:   Peter Eisentraut <peter@eisentraut.org>
Date:     Wed Sep 23 07:16:33 2026 +0000

    Fix alignas placement in GinTuple
    
    Commit bad8829872d 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 884f82ae262.
    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.


src/include/access/gin_tuple.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/access/gin_tuple.h b/src/include/access/gin_tuple.h index d2c7b50d1de..e918946f213 100644 --- a/src/include/access/gin_tuple.h +++ b/src/include/access/gin_tuple.h @@ -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