Skip to content

@section rejects C function references as non-const #85411

@grynspan

Description

@grynspan

jon@jgubuntu:~$ swift --version
Swift version 6.3-dev (LLVM bff1370bd79c983, Swift 57cf4ce)
Target: x86_64-unknown-linux-gnu
Build config: +assertions

Using @section to store a reference to a C function (declared in Swift as @convention(c)) fails. This worked with @_section. See: https://github.com/swiftlang/swift-testing/actions/runs/19238300266/job/54994093045?pr=1408

This does look like it works on Darwin, but fails on Linux.

Metadata

Metadata

Assignees

Labels

@conventionFeature → attributes: the @convention attribute

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions