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

Remove redefinition of NULL for MSVC

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 23
    • hotspot
    • x86
    • windows

      In globalDefinitions_visCPP.hpp there is a redefinition of NULL to work around an issue with it being a 32bit int (so not pointer sized) on 64bit platforms. Once all uses of NULL in HotSpot have been replaced with nullptr, there is no longer any need for this, and it can be removed.

      One might think that redefinition might no longer be needed at all, since it's working around a pretty old issue. But apparently it's still the case that sizeof(NULL) != sizeof(void*) for 64bit builds. But a literal 0 (a 32bit int) is a valid null pointer constant.

            Unassigned Unassigned
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: