[llvm-bugs] [Bug 37226] New: Static storage duration std::atomic_flag not statically initialized when initialized with ATOMIC_FLAG_INIT

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 24 14:53:09 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37226

            Bug ID: 37226
           Summary: Static storage duration std::atomic_flag not
                    statically initialized when initialized with
                    ATOMIC_FLAG_INIT
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ricky at rzhou.org
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com

For example: https://godbolt.org/g/C8ZmBY

#include <atomic>

std::atomic_flag global = ATOMIC_FLAG_INIT;

void f() {
  static std::atomic_flag local = ATOMIC_FLAG_INIT;
}

Neither of these are statically initialized, even though that seems to be
required by the standard.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180424/a4300065/attachment.html>


More information about the llvm-bugs mailing list