From d300e6bf212f35c9a64369a4acc760a79adec013 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 11 Apr 2013 00:01:08 +0200 Subject: util/Manual: work around strict-aliasing warning --- src/util/Manual.hxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/util/Manual.hxx b/src/util/Manual.hxx index ecd2c52b8..798bc3e24 100644 --- a/src/util/Manual.hxx +++ b/src/util/Manual.hxx @@ -40,6 +40,11 @@ #include +#if defined(__clang__) || GCC_CHECK_VERSION(4,7) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif + /** * Container for an object that gets constructed and destructed * manually. The object is constructed in-place, and therefore @@ -108,4 +113,8 @@ public: } }; +#if defined(__clang__) || GCC_VERSION >= 40700 +#pragma GCC diagnostic pop +#endif + #endif -- cgit v1.2.3