Skip to content

Deprecation warning for ATOMIC_VAR_INIT in mimalloc #121487

Closed
@cdce8p

Description

@cdce8p

Bug report

Bug description:

ATOMIC_VAR_INIT is marked as deprecated in C17 and C++20.

/.../cpython/Include/internal/mimalloc/mimalloc/atomic.h:42:14: error: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Werror,-Wdeprecated-pragma] (diff)
  #if !defined(ATOMIC_VAR_INIT) || (__STDC_VERSION__ >= 201710L) // c17, see issue #735
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdatomic.h:54:41: note: macro marked 'deprecated' here
  #pragma clang deprecated(ATOMIC_VAR_INIT)

This was fixed upstream but isn't included in the vendored copy.
microsoft/mimalloc@36ee5f9
microsoft/mimalloc@1325ee6
microsoft/mimalloc#735

CPython versions tested on:

3.13, CPython main branch

Operating systems tested on:

macOS

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions