[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57655] trunk/blender/source/blender/ blenlib/intern: build fix for old gccs (after rev.57620)

Dalai Felinto dfelinto at gmail.com
Sat Jun 22 22:00:18 CEST 2013


Revision: 57655
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57655
Author:   dfelinto
Date:     2013-06-22 20:00:17 +0000 (Sat, 22 Jun 2013)
Log Message:
-----------
build fix for old gccs (after rev.57620)
enabling the new pragmas only when gcc >= 4.6
gcc 4.2.1 here (OSX)

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/intern/BLI_ghash.c
    trunk/blender/source/blender/blenlib/intern/BLI_heap.c
    trunk/blender/source/blender/blenlib/intern/BLI_mempool.c

Modified: trunk/blender/source/blender/blenlib/intern/BLI_ghash.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/BLI_ghash.c	2013-06-22 18:08:58 UTC (rev 57654)
+++ trunk/blender/source/blender/blenlib/intern/BLI_ghash.c	2013-06-22 20:00:17 UTC (rev 57655)
@@ -44,9 +44,11 @@
 
 #ifdef __GNUC__
 #  pragma GCC diagnostic error "-Wsign-conversion"
+#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406  /* gcc4.6+ only */
 #  pragma GCC diagnostic error "-Wsign-compare"
 #  pragma GCC diagnostic error "-Wconversion"
 #endif
+#endif
 
 const unsigned int hashsizes[] = {
 	5, 11, 17, 37, 67, 131, 257, 521, 1031, 2053, 4099, 8209, 

Modified: trunk/blender/source/blender/blenlib/intern/BLI_heap.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/BLI_heap.c	2013-06-22 18:08:58 UTC (rev 57654)
+++ trunk/blender/source/blender/blenlib/intern/BLI_heap.c	2013-06-22 20:00:17 UTC (rev 57655)
@@ -41,9 +41,11 @@
 
 #ifdef __GNUC__
 #  pragma GCC diagnostic error "-Wsign-conversion"
+#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406  /* gcc4.6+ only */
 #  pragma GCC diagnostic error "-Wsign-compare"
 #  pragma GCC diagnostic error "-Wconversion"
 #endif
+#endif
 
 /***/
 

Modified: trunk/blender/source/blender/blenlib/intern/BLI_mempool.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/BLI_mempool.c	2013-06-22 18:08:58 UTC (rev 57654)
+++ trunk/blender/source/blender/blenlib/intern/BLI_mempool.c	2013-06-22 20:00:17 UTC (rev 57655)
@@ -45,9 +45,11 @@
 
 #ifdef __GNUC__
 #  pragma GCC diagnostic error "-Wsign-conversion"
+#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406  /* gcc4.6+ only */
 #  pragma GCC diagnostic error "-Wsign-compare"
 #  pragma GCC diagnostic error "-Wconversion"
 #endif
+#endif
 
 /* note: copied from BLO_blend_defs.h, don't use here because we're in BLI */
 #ifdef __BIG_ENDIAN__




More information about the Bf-blender-cvs mailing list