Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8200084

test_align.cpp fails to build on Windows without precompiled headers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • 11
    • 11
    • hotspot
    • None

      I get the following compile error on Windows when compiling without precompiled headers:
      t:/workspace/open/test/hotspot/gtest/utilities/test_align.cpp(37) : warning C4003: not enough actual parameters for macro ‘max’

      The likely started to happen after this change:

      changeset: 49262:6e9e88d82781
      user: gziemski
      date: Mon Mar 19 13:57:08 2018 -0500
      summary: 8199356: Fix hotspot to allow stdlib to use libc++ and to allow changing the deployment target to 10.9

      diff --git a/src/hotspot/share/utilities/globalDefinitions.hpp b/src/hotspot/share/utilities/globalDefinitions.hpp
      --- a/src/hotspot/share/utilities/globalDefinitions.hpp
      +++ b/src/hotspot/share/utilities/globalDefinitions.hpp
      @@ -1012,12 +1012,6 @@
       #undef min
       #endif

      -// The following defines serve the purpose of preventing use of accidentally
      -// included min max macros from compiling, while continuing to allow innocent
      -// min and max identifiers in the code to compile as intended.
      -#define max max
      -#define min min

      This fails on lines containing:
      std::numeric_limits<T>::max()

            stefank Stefan Karlsson
            stefank Stefan Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: