Fix pragma clang ignore with gcc.
diff --git a/test/output_test_helper.cc b/test/output_test_helper.cc
index b67140b..4e98553 100644
--- a/test/output_test_helper.cc
+++ b/test/output_test_helper.cc
@@ -9,10 +9,14 @@
 #include "output_test.h"
 
 // clang fails with -Werror because IsZero() is not used in this library
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wunused-function"
+#ifdef __clang__
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wunused-function"
+#endif
 #include "../src/benchmark_api_internal.h" // IsZero() is provided here
-#pragma clang diagnostic pop
+#ifdef __clang__
+# pragma clang diagnostic pop
+#endif
 
 // ========================================================================= //
 // ------------------------------ Internals -------------------------------- //