List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:July 14 2010 7:39pm
Subject:bzr commit into mysql-5.1-bugteam branch (davi:3484) Bug#42733
View as plain text  
# At a local mysql-5.1-bugteam repository of davi

 3484 Davi Arnaut	2010-07-14
      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.

    modified:
      include/my_compiler.h
      include/my_global.h
      sql/spatial.h
=== modified file 'include/my_compiler.h'
--- a/include/my_compiler.h	2010-07-14 12:27:13 +0000
+++ b/include/my_compiler.h	2010-07-14 19:39:40 +0000
@@ -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 */

=== modified file 'include/my_global.h'
--- a/include/my_global.h	2010-07-14 12:27:13 +0000
+++ b/include/my_global.h	2010-07-14 19:39:40 +0000
@@ -623,7 +623,7 @@ typedef unsigned short ushort;
 #define my_const_cast(A) (A)
 #endif
 
-#include <my_attribute.h>
+#include <my_compiler.h>
 
 /*
   Wen using the embedded library, users might run into link problems,

=== modified file 'sql/spatial.h'
--- a/sql/spatial.h	2010-07-14 12:27:13 +0000
+++ b/sql/spatial.h	2010-07-14 19:39:40 +0000
@@ -16,8 +16,6 @@
 #ifndef _spatial_h
 #define _spatial_h
 
-#include <my_compiler.h>
-
 #ifdef HAVE_SPATIAL
 
 const uint SRID_SIZE= 4;


Attachment: [text/bzr-bundle] bzr/davi.arnaut@sun.com-20100714193940-puvj8mf8a1l7rdcw.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (davi:3484) Bug#42733Davi Arnaut14 Jul