[all-commits] [llvm/llvm-project] e3d38b: [flang][msvc] Tell windows.h to not define min/max...

Michael Kruse via All-commits all-commits at lists.llvm.org
Wed Aug 12 12:36:43 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e3d38b7b88989835d11b9d134482c17655b5a65d
      https://github.com/llvm/llvm-project/commit/e3d38b7b88989835d11b9d134482c17655b5a65d
  Author: Michael Kruse <llvm-project at meinersbur.de>
  Date:   2020-08-12 (Wed, 12 Aug 2020)

  Changed paths:
    M flang/runtime/file.cpp

  Log Message:
  -----------
  [flang][msvc] Tell windows.h to not define min/max macros.

Defining macros for min and max breaks using std::min and std::max. Defining NOMINMAX before including the header stops them from being defined.

See https://web.archive.org/web/20170911092732/https://support.microsoft.com/en-us/help/143208/prb-using-stl-in-windows-program-can-cause-min-max-conflicts for details.

This patch is part of the series to [[ http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html | make flang compilable with MS Visual Studio ]].

Reviewed By: isuruf

Differential Revision: https://reviews.llvm.org/D85656




More information about the All-commits mailing list