clang compilation error on hardware_constructive_interference_size

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: hotspot
    • None
    • x86_64
    • linux

      since:
      Author: Kim Barrett <kbarrett@openjdk.org>
      Date: Wed Nov 19 20:56:21 2025 +0000
          8369187: Add wrapper for <new> that forbids use of global allocation and deallocation functions

      Fedora 42 x86_64
      clang-20.1.8-4.fc42.x86_64
      libstdc++-devel-15.2.1-4.fc42.x86_64

      src/hotspot/share/cppstdlib/new.hpp:102:3: error: attribute declaration must precede definition [-Werror,-Wignored-attributes]
        102 | [[deprecated]] extern const size_t hardware_destructive_interference_size;
            | ^
      /usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/new:249:27: note: previous definition is here
        249 | inline constexpr size_t hardware_destructive_interference_size = __GCC_DESTRUCTIVE_SIZE;
            | ^

            Assignee:
            Unassigned
            Reporter:
            Jan Kratochvil
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: