pgsql: C11 alignas instead of unions - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: C11 alignas instead of unions
Date
Msg-id E1vMNSR-000bz2-1e@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
C11 alignas instead of unions

This changes a few union members that only existed to ensure
alignments and replaces them with the C11 alignas specifier.

This change only uses fundamental alignments (meaning approximately
alignments of basic types), which all C11 compilers must support.
There are opportunities for similar changes using extended alignments,
for example in PGIOAlignedBlock, but these are not necessarily
supported by all compilers, so they are kept as a separate change.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/46f05236-d4d4-4b4e-84d4-faa500f14691%40eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/97e04c74bedb902327b89eb8a9e6aea01aabdad2

Modified Files
--------------
src/backend/access/common/toast_internals.c |  4 +---
src/backend/commands/async.c                | 14 +++++---------
src/backend/storage/large_object/inv_api.c  |  8 ++------
src/include/c.h                             | 10 +++-------
4 files changed, 11 insertions(+), 25 deletions(-)


pgsql-committers by date:

Previous
From: Masahiko Sawada
Date:
Subject: pgsql: Use "COPY table TO" for partitioned tables in initial table sync
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Update timezone to C99