summaryrefslogtreecommitdiff
path: root/include/my_compiler.h
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2010-07-14 16:39:40 -0300
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2010-07-14 16:39:40 -0300
commitd7944b621e895383482792df3b8aa3eed6ee5f6d (patch)
tree05485c186839ac3c248a3e0355728341d0f397d4 /include/my_compiler.h
parentf317d3a6fb413cfc04c1ed005df8e859664e41d5 (diff)
downloadmariadb-git-d7944b621e895383482792df3b8aa3eed6ee5f6d.tar.gz
Bug#42733: Type-punning warnings when compiling MySQL --
strict aliasing violations. Post-merge fix: include my_compiler.h before my_attribute.h as the latter will undef __attribute__ if the compiler is not GCC. Based on the compiler version, in my_compiler.h we know for sure whether the aligned attribute is supported. Furthermore, undefining attribute might cause bugs if some system header uses it. include/my_compiler.h: Drop aligned attribute support from Sun Studio C++ compiler as its not clear exactly which version of it supports the attribute.
Diffstat (limited to 'include/my_compiler.h')
-rw-r--r--include/my_compiler.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/my_compiler.h b/include/my_compiler.h
index 0a83c6587a5..1cd46ff4260 100644
--- a/include/my_compiler.h
+++ b/include/my_compiler.h
@@ -42,7 +42,7 @@
/* Oracle Solaris Studio */
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-# if (__SUNPRO_C >= 0x590) || (__SUNPRO_CC >= 0x590)
+# if __SUNPRO_C >= 0x590
# define MY_ALIGN_EXT
# endif
@@ -124,4 +124,6 @@ struct my_aligned_storage
#endif /* __cplusplus */
+#include <my_attribute.h>
+
#endif /* MY_COMPILER_INCLUDED */