src/SDL_error.c
changeset 10644 594c17c446f6
parent 10643 930938c7ca82
child 10737 3406a0f8b041
     1.1 --- a/src/SDL_error.c	Wed Nov 23 11:49:26 2016 -0500
     1.2 +++ b/src/SDL_error.c	Wed Nov 23 17:20:28 2016 -0500
     1.3 @@ -177,9 +177,11 @@
     1.4  /* keep this at the end of the file so it works with GCC builds that don't
     1.5     support "#pragma GCC diagnostic push" ... we'll just leave the warning
     1.6     disabled after this. */
     1.7 -#ifdef __GNUC__
     1.8 +/* this pragma arrived in GCC 4.2 and causes a warning on older GCCs! Sigh. */
     1.9 +#if defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 2))))
    1.10  #pragma GCC diagnostic ignored "-Wformat-nonliteral"
    1.11  #endif
    1.12 +
    1.13  /* This function has a bit more overhead than most error functions
    1.14     so that it supports internationalization and thread-safe errors.
    1.15  */