mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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.
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user