Skip to content

Why does objc_storeStrong return id? #419

Description

@HendrikHuebner

In the ancient Clang docs it is indeed declared as returning id: https://releases.llvm.org/3.1/tools/clang/docs/AutomaticReferenceCounting.html?utm_source=chatgpt.com#runtime.objc_storeStrong

However, objc4 declares it as void: https://github.com/opensource-apple/objc4/blob/cd5e62a5597ea7a31dccef089317abb3a661c154/runtime/objc-internal.h#L481

And clang does not seem to care about the return value at all: https://github.com/llvm/llvm-project/blob/2c72beb8fe47f93963e575709370d884459012cd/clang/lib/CodeGen/CGObjC.cpp#L2556

This is once again an issue for WebAssembly, which does not tolate signature mismatches unlike native ABIs like x86 or arm.

Is changing the signature of objc_storeStrong in libobjc2 an option? Perhaps only for wasm platforms?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions