aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/Manual.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-04-11 00:01:08 +0200
committerMax Kellermann <max@duempel.org>2013-04-11 00:01:08 +0200
commitd300e6bf212f35c9a64369a4acc760a79adec013 (patch)
tree1d2d34d2bb31d229327a0d7f9ec95a11af939c6b /src/util/Manual.hxx
parent1729388634d28ba9ad247c6e806a172993fdc97b (diff)
downloadmpd-d300e6bf212f35c9a64369a4acc760a79adec013.tar.gz
mpd-d300e6bf212f35c9a64369a4acc760a79adec013.tar.xz
mpd-d300e6bf212f35c9a64369a4acc760a79adec013.zip
util/Manual: work around strict-aliasing warning
Diffstat (limited to '')
-rw-r--r--src/util/Manual.hxx9
1 files changed, 9 insertions, 0 deletions
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 <assert.h>
+#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