Don't error of sign-conversion for < gcc v4.8

Behavior is different and hard to keep building on older versions.
This commit is contained in:
Campbell Barton 2014-09-29 10:57:46 +10:00
parent 101a1dddae
commit 0334be9f7f
Notes: blender-bot 2023-02-14 10:01:17 +01:00
Referenced by issue #42060, File Browser > System Bookmarks > Order
Referenced by issue #42021, Cycles OSL renders a black image
1 changed files with 4 additions and 2 deletions

View File

@ -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