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

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 26
    • Affects Version/s: None
    • Component/s: hotspot
    • b04

      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.

            Assignee:
            Kim Barrett
            Reporter:
            Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: