From 98a4c7cf3d799ab953cb77e8b34597c73e3e7335 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 4 Feb 2010 15:00:15 +0100 Subject: *: suppress ~60% of "aliased warnings" on gcc-4.4.1 Signed-off-by: Denys Vlasenko --- include/platform.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/platform.h') diff --git a/include/platform.h b/include/platform.h index b58b14936..ab4402e79 100644 --- a/include/platform.h +++ b/include/platform.h @@ -100,6 +100,13 @@ # define EXTERNALLY_VISIBLE #endif +/* At 4.4 gcc become much more anal about this, need to use "aliased" types */ +#if __GNUC_PREREQ(4,4) +# define FIX_ALIASING __attribute__((__may_alias__)) +#else +# define FIX_ALIASING +#endif + /* We use __extension__ in some places to suppress -pedantic warnings about GCC extensions. This feature didn't work properly before gcc 2.8. */ -- cgit v1.2.3