From 0334be9f7f5abdda0ee48b8b39b694ddb93405dd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 29 Sep 2014 10:57:46 +1000 Subject: Don't error of sign-conversion for < gcc v4.8 Behavior is different and hard to keep building on older versions. --- source/blender/blenlib/BLI_strict_flags.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/blenlib/BLI_strict_flags.h') diff --git a/source/blender/blenlib/BLI_strict_flags.h b/source/blender/blenlib/BLI_strict_flags.h index 1d595ff3bf3..964ee06469d 100644 --- a/source/blender/blenlib/BLI_strict_flags.h +++ b/source/blender/blenlib/BLI_strict_flags.h @@ -28,13 +28,15 @@ */ #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 -# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 /* gcc4.8+ only (behavior changed to ignore globals)*/ +# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 + /* gcc4.8+ only (behavior changed to ignore globals)*/ # pragma GCC diagnostic error "-Wshadow" + /* older gcc changed behavior with ternary */ +# pragma GCC diagnostic error "-Wsign-conversion" # endif /* pedantic gives too many issues, developers can define this for own use */ # ifdef WARN_PEDANTIC -- cgit v1.2.3