# File src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb, line 263
    def self.try_compile_with_warning_flag(description, language, source, flags = nil)
      extension = detect_language_extension(language)
      result = nil
      create_temp_file("passenger-compile-check.#{extension}") do |filename, f|
        f.puts(source)
        f.close
        command = create_compiler_command(language,
          "-c '#{filename}' -o '#{filename}.o'",
          flags)
        result = run_compiler(description, command, filename, source, true)
        result = result && result[:result] && result[:output] !~ /unknown warning option/i
      end
      return false if !result

      # For some reason, GCC does not complain about a warning flag
      # not being supported unless the source contains another error. So we
      # check for this.
      create_temp_file("passenger-compile-check.#{extension}") do |filename, f|
        source = %Q{
          void foo() {
            return error;
          }
        }
        f.puts(source)
        f.close
        command = create_compiler_command(language,
          "-c '#{filename}' -o '#{filename}.o'",
          flags)
        result = run_compiler("#{description} (really)", command, filename, source, :always)
      end
      result && !result[:output].include?(flags)
    end