From e748efacd823b637778dcd3a3a4fd8b1f0ca86e7 Mon Sep 17 00:00:00 2001 From: Piotr Tworek Date: Thu, 14 Oct 2021 22:10:26 +0200 Subject: [PATCH] reconstructible: Fix alignas specifier placement. Alignas should be placed before the type. Placing it after it works for GCC, but fails when building the same codee with clang. The error message is: reconstructible.h:48:27: error: 'alignas' attribute cannot be applied to types char _space[sizeof(MT)] alignas(sizeof(addr_t)); ^ Issue #4298 --- repos/base/include/util/reconstructible.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/base/include/util/reconstructible.h b/repos/base/include/util/reconstructible.h index 036f430c5f..efb02ba3f3 100644 --- a/repos/base/include/util/reconstructible.h +++ b/repos/base/include/util/reconstructible.h @@ -45,7 +45,7 @@ Genode::Reconstructible : Noncopyable /** * Static reservation of memory for the embedded object */ - char _space[sizeof(MT)] alignas(sizeof(addr_t)); + alignas(sizeof(addr_t)) char _space[sizeof(MT)]; /** * True if the volatile object contains a constructed object