Commit d5e8508f authored by Davi Arnaut's avatar Davi Arnaut

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.
parent 21f63caf
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
/* Oracle Solaris Studio */ /* Oracle Solaris Studio */
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# if (__SUNPRO_C >= 0x590) || (__SUNPRO_CC >= 0x590) # if __SUNPRO_C >= 0x590
# define MY_ALIGN_EXT # define MY_ALIGN_EXT
# endif # endif
...@@ -124,4 +124,6 @@ struct my_aligned_storage ...@@ -124,4 +124,6 @@ struct my_aligned_storage
#endif /* __cplusplus */ #endif /* __cplusplus */
#include <my_attribute.h>
#endif /* MY_COMPILER_INCLUDED */ #endif /* MY_COMPILER_INCLUDED */
...@@ -623,7 +623,7 @@ typedef unsigned short ushort; ...@@ -623,7 +623,7 @@ typedef unsigned short ushort;
#define my_const_cast(A) (A) #define my_const_cast(A) (A)
#endif #endif
#include <my_attribute.h> #include <my_compiler.h>
/* /*
Wen using the embedded library, users might run into link problems, Wen using the embedded library, users might run into link problems,
......
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
#ifndef _spatial_h #ifndef _spatial_h
#define _spatial_h #define _spatial_h
#include <my_compiler.h>
#ifdef HAVE_SPATIAL #ifdef HAVE_SPATIAL
const uint SRID_SIZE= 4; const uint SRID_SIZE= 4;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment