From 8443dcf3bb1249df53af5302e7fa58b224e0a7d5 Mon Sep 17 00:00:00 2001 From: Jason Volk <jason@zemos.net> Date: Sun, 9 Aug 2020 07:41:48 -0700 Subject: [PATCH] ircd::simd: Macro and diagnostic adjustments for GCC. --- include/ircd/simd/type.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/include/ircd/simd/type.h b/include/ircd/simd/type.h index 095b1ffc0..83e707437 100644 --- a/include/ircd/simd/type.h +++ b/include/ircd/simd/type.h @@ -11,24 +11,28 @@ #pragma once #define HAVE_IRCD_SIMD_TYPE_H +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wpsabi" +#pragma GCC diagnostic ignored "-Wpacked" + /// Unaligned type wrapper macro #define IRCD_SIMD_TYPEDEF_UNALIGNED(TYPE, NAME) \ -struct [[gnu::visibility("internal")]] \ +struct \ +__attribute__((packed)) \ +__attribute__((aligned(1))) \ +__attribute__((visibility("internal"))) \ NAME \ { \ TYPE val; \ \ operator TYPE () const { return val; } \ - operator TYPE &() { return val; } \ \ template<class T> NAME &operator=(T&& t) \ { \ val = std::forward<T>(t); \ return *this; \ } \ -} \ -__attribute__((packed)) \ -__attribute__((aligned(1))) +} // // scalar @@ -154,6 +158,8 @@ namespace ircd } #endif +#pragma GCC diagnostic pop + // // other words //