]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Use C11 alignas instead of pg_attribute_aligned
authorPeter Eisentraut <peter@eisentraut.org>
Mon, 29 Jun 2026 08:46:51 +0000 (10:46 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Wed, 1 Jul 2026 06:36:43 +0000 (08:36 +0200)
Replace pg_attribute_aligned with C11 alignas, for consistency with
current conventions.

(These new uses were added by commit fbc57f2bc2e, which was developed
concurrently with the switch from pg_attribute_aligned to C11 standard
alignas, and it ended up being committed with the "old" style.)

Reviewed-by: John Naylor <johncnaylorls@gmail.com>
Discussion: https://postgr.es/m/CANWCAZaKhE+RD5KKouUFoxx1EbUNrNhcduM1VQ=DkSDadNEFng@mail.gmail.com

src/port/pg_crc32c_armv8.c

index 8cf838a510a21d3ee3ce091cb56d38d18bfcf2ec..8fad2f83c24f223d0a5e2085a4153a471f77c582 100644 (file)
@@ -166,7 +166,7 @@ pg_comp_crc32c_pmull(pg_crc32c crc, const void *data, size_t len)
                uint64x2_t      k;
 
                {
-                       static const uint64_t pg_attribute_aligned(16) k_[] = {0x740eef02, 0x9e4addf8};
+                       static const alignas(16) uint64_t k_[] = {0x740eef02, 0x9e4addf8};
 
                        k = vld1q_u64(k_);
                }
@@ -192,14 +192,14 @@ pg_comp_crc32c_pmull(pg_crc32c crc, const void *data, size_t len)
 
                /* Reduce x0 ... x3 to just x0. */
                {
-                       static const uint64_t pg_attribute_aligned(16) k_[] = {0xf20c0dfe, 0x493c7d27};
+                       static const alignas(16) uint64_t k_[] = {0xf20c0dfe, 0x493c7d27};
 
                        k = vld1q_u64(k_);
                }
                y0 = clmul_lo_e(x0, k, x1), x0 = clmul_hi_e(x0, k, y0);
                y2 = clmul_lo_e(x2, k, x3), x2 = clmul_hi_e(x2, k, y2);
                {
-                       static const uint64_t pg_attribute_aligned(16) k_[] = {0x3da6d0cb, 0xba4fc28e};
+                       static const alignas(16) uint64_t k_[] = {0x3da6d0cb, 0xba4fc28e};
 
                        k = vld1q_u64(k_);
                }