diff --git a/src/os_macosx.m b/src/os_macosx.m
index 6fd72fd28..b0d29d947 100644
--- a/src/os_macosx.m
+++ b/src/os_macosx.m
@@ -11,6 +11,14 @@
  * os_macosx.m -- Mac specific things for Mac OS X.
  */
 
+/* Suppress compiler warnings to non-C89 code. */
+#if defined(__clang__) && defined(__STRICT_ANSI__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wc99-extensions"
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wdeclaration-after-statement"
+#endif
+
 /* Avoid a conflict for the definition of Boolean between Mac header files and
  * X11 header files. */
 #define NO_X11_INCLUDES
@@ -189,3 +197,9 @@ releasepool:
 }
 
 #endif /* FEAT_CLIPBOARD */
+
+/* Lift the compiler warning suppression. */
+#if defined(__clang__) && defined(__STRICT_ANSI__)
+# pragma clang diagnostic pop
+# pragma clang diagnostic pop
+#endif
diff --git a/src/quickfix.c b/src/quickfix.c
index 7ee386dbb..e8fe59b33 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -4099,7 +4099,7 @@ ex_cfile(exarg_T *eap)
     win_T	*wp = NULL;
     qf_info_T	*qi = &ql_info;
     char_u	*au_name = NULL;
-    int		save_qfid = 0;  // init for gcc
+    int		save_qfid = 0;  /* init for gcc */
     int		res;
 
     switch (eap->cmdidx)
