diff options
author | Steve MacLean <Steve.MacLean@Microsoft.com> | 2020-05-21 17:49:53 -0400 |
---|---|---|
committer | Steve MacLean <Steve.MacLean@Microsoft.com> | 2020-05-21 18:02:15 -0400 |
commit | da8dc856ab5646e04160060aae9425db3f5428ce (patch) | |
tree | d7e15df27d0b9007e8db57d99c189a62fe398ee8 /src | |
parent | d627f4aea024f7d1bfaa7ce7293379316c7713ea (diff) | |
download | libunwind-da8dc856ab5646e04160060aae9425db3f5428ce.tar.gz |
Use C11 alignas(x)
Diffstat (limited to 'src')
-rw-r--r-- | src/mi/mempool.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mi/mempool.c b/src/mi/mempool.c index 536b64e8..d7f0d83b 100644 --- a/src/mi/mempool.c +++ b/src/mi/mempool.c @@ -25,6 +25,7 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "libunwind_i.h" +#include <stdalign.h> /* From GCC docs: ``Gcc also provides a target specific macro * __BIGGEST_ALIGNMENT__, which is the largest alignment ever used for any data @@ -39,7 +40,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ # define MAX_ALIGN MAX_ALIGN_(sizeof (long double)) #endif -static char sos_memory[SOS_MEMORY_SIZE] ALIGNED(MAX_ALIGN); +static char alignas(MAX_ALIGN) sos_memory[SOS_MEMORY_SIZE]; static size_t sos_memory_freepos; static size_t pg_size; |