Browse Source

stb_sprintf: GCC compilation fix

Fixes issue #1010.
Fabian Giesen 4 years ago
parent
commit
d2476c3845
1 changed files with 2 additions and 2 deletions
  1. 2 2
      stb_sprintf.h

+ 2 - 2
stb_sprintf.h

@@ -154,8 +154,8 @@ PERFORMANCE vs MSVC 2008 32-/64-bit (GCC is even slower than MSVC):
    #endif
    #endif
   #endif
   #endif
  #endif
  #endif
-#elif __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
- #if __SANITIZE_ADDRESS__
+#elif defined(__GNUC__) && (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
+ #if defined(__SANITIZE_ADDRESS__) && __SANITIZE_ADDRESS__
   #define STBSP__ASAN __attribute__((__no_sanitize_address__))
   #define STBSP__ASAN __attribute__((__no_sanitize_address__))
  #endif
  #endif
 #endif
 #endif