From 1a2cd280839191442a436e8bee7f941241f2b7ca Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Fri, 17 Aug 2018 12:39:56 -0500
Subject: [PATCH] Wrap --Wignored-attributes ignorer around
 std::vector<cl_device_affinity_domain> constructor

---
 src/wrap_cl.hpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/wrap_cl.hpp b/src/wrap_cl.hpp
index 1314a156..a20f2f0f 100644
--- a/src/wrap_cl.hpp
+++ b/src/wrap_cl.hpp
@@ -745,7 +745,16 @@ namespace pyopencl
             }
           case CL_DEVICE_PARTITION_AFFINITY_DOMAIN:
             {
+#if defined(__GNUG__) && !defined(__clang__)
+#pragma GCC diagnostic push
+// what's being ignored here is an alignment attribute to native size, which
+// shouldn't matter on the relevant ABIs that I'm aware of.
+#pragma GCC diagnostic ignored "-Wignored-attributes"
+#endif
               std::vector<cl_device_affinity_domain> result;
+#if defined(__GNUG__) && !defined(__clang__)
+#pragma GCC diagnostic pop
+#endif
               PYOPENCL_GET_VEC_INFO(Device, m_device, param_name, result);
               PYOPENCL_RETURN_VECTOR(cl_device_affinity_domain, result);
             }
-- 
GitLab