diff options
author | Steve MacLean <Steve.MacLean@Microsoft.com> | 2020-06-11 14:48:16 -0400 |
---|---|---|
committer | Dave Watson <dade.watson@gmail.com> | 2020-06-18 13:36:48 -0700 |
commit | cb4a36935669a3c7f34b065aa8aa9953f506c758 (patch) | |
tree | 63a3adf9fd8465b6dd28954b7c9933094cb95e7f | |
parent | 4b2015fbd8a6a4ec4dd4bcbc2413738cec89b7aa (diff) | |
download | libunwind-cb4a36935669a3c7f34b065aa8aa9953f506c758.tar.gz |
Fix placement of alignas() specifier
The alignment specifier must appear before the typename
i.e. clang9 refused to compile
uint8_t alignas(MAX_ALIGN) __reserved[128];
but accepted
alignas(MAX_ALIGN) uint8_t __reserved[128];
-rw-r--r-- | include/libunwind-aarch64.h | 2 | ||||
-rw-r--r-- | include/unwind.h | 2 | ||||
-rw-r--r-- | src/mi/mempool.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/include/libunwind-aarch64.h b/include/libunwind-aarch64.h index d1bd8708..d78fbd44 100644 --- a/include/libunwind-aarch64.h +++ b/include/libunwind-aarch64.h @@ -194,7 +194,7 @@ struct unw_sigcontext uint64_t sp; uint64_t pc; uint64_t pstate; - uint8_t alignas(16) __reserved[(66 * 8)]; + alignas(16) uint8_t __reserved[(66 * 8)]; }; typedef struct diff --git a/include/unwind.h b/include/unwind.h index 8eb5ff75..93780fad 100644 --- a/include/unwind.h +++ b/include/unwind.h @@ -77,7 +77,7 @@ typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) (int, _Unwind_Action, even on 32-bit machines for gcc compatibility. */ struct _Unwind_Exception { - uint64_t alignas(8) exception_class; + alignas(8) uint64_t exception_class; _Unwind_Exception_Cleanup_Fn exception_cleanup; unsigned long private_1; unsigned long private_2; diff --git a/src/mi/mempool.c b/src/mi/mempool.c index 3e8da676..7c5d27d0 100644 --- a/src/mi/mempool.c +++ b/src/mi/mempool.c @@ -41,7 +41,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ # define MAX_ALIGN MAX_ALIGN_(sizeof (long double)) #endif -static char alignas(MAX_ALIGN) sos_memory[SOS_MEMORY_SIZE]; +static alignas(MAX_ALIGN) char sos_memory[SOS_MEMORY_SIZE]; static _Atomic size_t sos_memory_freepos = 0; static size_t pg_size; |