 +        def patched__compile(obj, src, ext, cc_args, extra_postargs, pp_opts):
 +            # remove c++ specific options for C files
 +            if src.endswith('.c'):
-+                cc_args = [arg for arg in cc_args if not arg.startswith("-std")]
++                extra_postargs = [arg for arg in extra_postargs if not arg.startswith("-std")]
 +            return original__compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
 +        # 3. monkey patch the method
 +        self.compiler._compile = patched__compile

+        finally:
+            # 4. restore to original, just in case
+            self.compiler._compile = original__compile
 
 
 #------------------------------------------------------------------------------------

@@ -22,6 +22,24 @@
         if compiler not in self.openmp_compile_args:
             compiler = '*'

+        ## QHull has a mix of C and C++ source files
+        ## Setuptools will apply the same flags to all files
+        ## GCC warns about passing -std=c++11 for C files
