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

HotSpot Style Guide should discourage non-local variables with non-trivial initialization or destruction

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • hotspot

      The style guide should discourage the use of non-local variables with static storage duration and non-trivial constructors or destructors. These are well known sources of various problems such as "initialization order fiascos".
      https://en.cppreference.com/w/cpp/language/siof

      The style guide should also discourage the use of non-local variables with static storage duration and non-constexpr initializers. It already discourages such for non-local variables with thread-local storage duration - JDK-8283469, JDK-8282721.

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

              Created:
              Updated: