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 <[email protected]>
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(-)

Reply via email to