diff --git a/tests/test-mcore.c b/tests/test-mcore.c index 7ce0768f..1b95cd27 100644 --- a/tests/test-mcore.c +++ b/tests/test-mcore.c @@ -627,7 +627,7 @@ static void test_M_CSTR(void) _Pragma("GCC diagnostic ignored \"-Wformat-truncation\"") #endif r = strcmp(M_CSTR("Hello %s %c", "World", '!'), "Hello W"); -#ifdef __GNUC__ +#if defined(__GNUC__) && __GNUC__ >= 7 && !defined(__clang__) _Pragma("GCC diagnostic pop") #endif assert (r == 0);