[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55246] trunk/blender/source/blender/ blenlib: attempt to quiet warnings for gcc4.2

Campbell Barton ideasman42 at gmail.com
Wed Mar 13 16:41:14 CET 2013


Revision: 55246
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55246
Author:   campbellbarton
Date:     2013-03-13 15:41:14 +0000 (Wed, 13 Mar 2013)
Log Message:
-----------
attempt to quiet warnings for gcc4.2

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/BLI_math_base.h
    trunk/blender/source/blender/blenlib/BLI_math_geom.h
    trunk/blender/source/blender/blenlib/BLI_math_inline.h
    trunk/blender/source/blender/blenlib/BLI_math_vector.h

Modified: trunk/blender/source/blender/blenlib/BLI_math_base.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_math_base.h	2013-03-13 15:27:54 UTC (rev 55245)
+++ trunk/blender/source/blender/blenlib/BLI_math_base.h	2013-03-13 15:41:14 UTC (rev 55246)
@@ -179,7 +179,7 @@
 #include "intern/math_base_inline.c"
 #endif
 
-#ifdef __GNUC__
+#ifdef BLI_MATH_GCC_WARN_PRAGMA
 #  pragma GCC diagnostic push
 #  pragma GCC diagnostic ignored "-Wredundant-decls"
 #endif
@@ -222,7 +222,7 @@
 
 double double_round(double x, int ndigits);
 
-#ifdef __GNUC__
+#ifdef BLI_MATH_GCC_WARN_PRAGMA
 #  pragma GCC diagnostic pop
 #endif
 

Modified: trunk/blender/source/blender/blenlib/BLI_math_geom.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_math_geom.h	2013-03-13 15:27:54 UTC (rev 55245)
+++ trunk/blender/source/blender/blenlib/BLI_math_geom.h	2013-03-13 15:41:14 UTC (rev 55246)
@@ -40,7 +40,7 @@
 #include "intern/math_geom_inline.c"
 #endif
 
-#ifdef __GNUC__
+#ifdef BLI_MATH_GCC_WARN_PRAGMA
 #  pragma GCC diagnostic push
 #  pragma GCC diagnostic ignored "-Wredundant-decls"
 #endif
@@ -286,7 +286,7 @@
 
 MINLINE int poly_to_tri_count(const int poly_count, const int corner_count);
 
-#ifdef __GNUC__
+#ifdef BLI_MATH_GCC_WARN_PRAGMA
 #  pragma GCC diagnostic pop
 #endif
 

Modified: trunk/blender/source/blender/blenlib/BLI_math_inline.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_math_inline.h	2013-03-13 15:27:54 UTC (rev 55245)
+++ trunk/blender/source/blender/blenlib/BLI_math_inline.h	2013-03-13 15:41:14 UTC (rev 55246)
@@ -56,6 +56,11 @@
 #  define MALWAYS_INLINE
 #endif
 
+/* gcc 4.6 (supports push/pop) */
+#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 406))
+#  define BLI_MATH_GCC_WARN_PRAGMA 1
+#endif
+
 #ifdef __cplusplus
 }
 #endif

Modified: trunk/blender/source/blender/blenlib/BLI_math_vector.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_math_vector.h	2013-03-13 15:27:54 UTC (rev 55245)
+++ trunk/blender/source/blender/blenlib/BLI_math_vector.h	2013-03-13 15:41:14 UTC (rev 55246)
@@ -42,7 +42,7 @@
 
 /************************************* Init ***********************************/
 
-#ifdef __GNUC__
+#ifdef BLI_MATH_GCC_WARN_PRAGMA
 #  pragma GCC diagnostic push
 #  pragma GCC diagnostic ignored "-Wredundant-decls"
 #endif
@@ -266,7 +266,7 @@
 void fill_vn_ushort(unsigned short *array_tar, const int size, const unsigned short val);
 void fill_vn_fl(float *array_tar, const int size, const float val);
 
-#ifdef __GNUC__
+#ifdef BLI_MATH_GCC_WARN_PRAGMA
 #  pragma GCC diagnostic pop
 #endif
 




More information about the Bf-blender-cvs mailing list