tests: fix weird gcc 4.9.2 bug
@@ -206,10 +206,10 @@ int init (int argc, char ** argv);
// 4.6.3
// 4.7.2
//(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52116)
-#if __GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ > 6 || (__GNUC_MINOR__ == 6 && __GNUC_PATCHLEVEL__ > 2))) || \
- (__GNUC__ == 4 && (__GNUC_MINOR__ > 7 || (__GNUC_MINOR__ == 7 && __GNUC_PATCHLEVEL__ > 1)))
+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ > 6 || (__GNUC_MINOR__ == 6 && __GNUC_PATCHLEVEL__ > 2))) || \
+ (__GNUC__ == 4 && (__GNUC_MINOR__ > 7 || (__GNUC_MINOR__ == 7 && __GNUC_PATCHLEVEL__ > 1))))
#define ELEKTRA_PRAGMA(x) _Pragma (ELEKTRA_PRAGMA_STR (x))
-#elif __clang_major__ > 3 || (__clang_major__ == 3 && (__clang_minor__ >= 3))
+#elif defined(__clang_major__) && (__clang_major__ > 3 || (__clang_major__ == 3 && (__clang_minor__ >= 3)))
// might also be supported in earlier versions of clang, but no documentation was found
#define ELEKTRA_PRAGMA(x) _Pragma (ELEKTRA_PRAGMA_STR (x))
#else
