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

Enable USE_NULLPTR_NOT_CONSTANT for Visual Studio

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • infrastructure
    • None

      Visual Studio provides warning C26477 - USE_NULLPTR_NOT_CONSTANT (https://learn.microsoft.com/en-us/cpp/code-quality/c26477?view=msvc-170). This warns about using literal 0 or NULL as a null pointer constant, so it provides at least as much as gcc's -Wzero-as-null-pointer-constant. We should enable this Visual Studio warning per the HotSpot Style Guide (JDK-8327173), similarly to enabling the gcc warning (JDK-8332189).

      There are probably code changes that need to be made first, similarly to what has been done for JDK-8332189.

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

              Created:
              Updated: