From 7eb43ee3065d0d928a1473fdf853506a4b73a5c1 Mon Sep 17 00:00:00 2001 From: Francois Keith <keith@lirmm.fr> Date: Fri, 28 Feb 2014 17:26:34 +0100 Subject: [PATCH] Disable -Wstrict-aliasing because of Py_RETURN_TRUE/FALSE. --- src/entity-py.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/entity-py.cc b/src/entity-py.cc index 9e25e70..3901eb0 100644 --- a/src/entity-py.cc +++ b/src/entity-py.cc @@ -26,6 +26,12 @@ #include "convert-dg-to-py.hh" #include "exception.hh" +// Ignore "dereferencing type-punned pointer will break strict-aliasing rules" +// warnings on gcc caused by Py_RETURN_TRUE and Py_RETURN_FALSE. +#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) +# pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif + using dynamicgraph::Entity; using dynamicgraph::SignalBase; using dynamicgraph::command::Command; -- GitLab