[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] Define alignof_slot using _Alignof when using C11 or newe
From: |
Paul Eggert |
Subject: |
Re: [PATCH v2] Define alignof_slot using _Alignof when using C11 or newer |
Date: |
Sat, 14 Jan 2023 17:51:59 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 |
On 2023-01-14 17:20, Khem Raj wrote:
+/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023
+<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
+ clang versions < 8.0.0 have the same bug. */
+#elif (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
+ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
+ && !defined __clang__) \
+ || (defined __clang__ && __clang_major__ < 8))
We already have two copies of that stuff elsewhere (in lib/stdalign.in.h
and m4/stdalign.m4), for reasons that currently escape me. Let's not
balloon the number of copies to three.
I installed the attached smaller patch which should do the trick for C.
Is there a similar problem with C++.
0001-alignof-port-to-strict-C23.patch
Description: Text Data