build fix for old gccs (after rev.57620)

enabling the new pragmas only when gcc >= 4.6
gcc 4.2.1 here (OSX)
This commit is contained in:
Dalai Felinto
2013-06-22 20:00:17 +00:00
parent c6adbe794e
commit d23bf09712
3 changed files with 6 additions and 0 deletions

View File

@@ -44,9 +44,11 @@
#ifdef __GNUC__ #ifdef __GNUC__
# pragma GCC diagnostic error "-Wsign-conversion" # 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 "-Wsign-compare"
# pragma GCC diagnostic error "-Wconversion" # pragma GCC diagnostic error "-Wconversion"
#endif #endif
#endif
const unsigned int hashsizes[] = { const unsigned int hashsizes[] = {
5, 11, 17, 37, 67, 131, 257, 521, 1031, 2053, 4099, 8209, 5, 11, 17, 37, 67, 131, 257, 521, 1031, 2053, 4099, 8209,

View File

@@ -41,9 +41,11 @@
#ifdef __GNUC__ #ifdef __GNUC__
# pragma GCC diagnostic error "-Wsign-conversion" # 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 "-Wsign-compare"
# pragma GCC diagnostic error "-Wconversion" # pragma GCC diagnostic error "-Wconversion"
#endif #endif
#endif
/***/ /***/

View File

@@ -45,9 +45,11 @@
#ifdef __GNUC__ #ifdef __GNUC__
# pragma GCC diagnostic error "-Wsign-conversion" # 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 "-Wsign-compare"
# pragma GCC diagnostic error "-Wconversion" # pragma GCC diagnostic error "-Wconversion"
#endif #endif
#endif
/* note: copied from BLO_blend_defs.h, don't use here because we're in BLI */ /* note: copied from BLO_blend_defs.h, don't use here because we're in BLI */
#ifdef __BIG_ENDIAN__ #ifdef __BIG_ENDIAN__