Bug 2421964 - swift build: warning: direct reference to protected function
Summary: swift build: warning: direct reference to protected function
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: swift-lang
Version: 43
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Link Dupont
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-12-13 09:46 UTC by Tobias
Modified: 2025-12-22 00:52 UTC (History)
4 users (show)

Fixed In Version: swift-lang-6.2-4.fc43
Clone Of:
Environment:
Last Closed: 2025-12-22 00:52:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tobias 2025-12-13 09:46:30 UTC
On a fresh install of Fedora 43 after installing swift-lang (dnf install swift-lang) and creating a new empty package (swift package init —-type tool) I see the following warnings during compilation:

```
[…]
warning: direct reference to protected function `$s20_CompilerSwiftSyntax0C8RewriterC8visitPreyyAA0C0VF' in `/usr/libexec/swift/6.2/bin/../lib/swift/host/compiler/lib_CompilerSwiftSyntax.so' may break pointer equality
warning: direct reference to protected function `$s20_CompilerSwiftSyntax0C8RewriterC9visitPostyyAA0C0VF' in `/usr/libexec/swift/6.2/bin/../lib/swift/host/compiler/lib_CompilerSwiftSyntax.so' may break pointer equality
warning: direct reference to protected function `$s20_CompilerSwiftSyntax0C8RewriterC7rewrite_6detachAA0C0Vx_SbtAA0C8ProtocolRzlF' in `/usr/libexec/swift/6.2/bin/../lib/swift/host/compiler/lib_CompilerSwiftSyntax.so' may break pointer equality
warning: direct reference to protected function `$s20_CompilerSwiftSyntax0C8RewriterC8visitPreyyAA0C0VF' in `/usr/libexec/swift/6.2/bin/../lib/swift/host/compiler/lib_CompilerSwiftSyntax.so' may break pointer equality
warning: direct reference to protected function `$s20_CompilerSwiftSyntax0C8RewriterC9visitPostyyAA0C0VF' in `/usr/libexec/swift/6.2/bin/../lib/swift/host/compiler/lib_CompilerSwiftSyntax.so' may break pointer equality
[68/68] Linking test
Build complete! (5.33s)
```

Reproducible: Always

Steps to Reproduce:
1. Install swift-lang
2. Create a new empty package
3. Run „swift Build“
Actual Results:
The build completes but with scary warnings.

Expected Results:
No warnings during build.

Comment 1 Link Dupont 2025-12-13 14:12:26 UTC
Hi! Thanks for the report. I just submitted a bug fix for another issue to Fedora 43. Do you mind trying the update in Bodhi and see if this issue still happens? https://bodhi.fedoraproject.org/updates/FEDORA-2025-db571dad17

Comment 2 Tobias 2025-12-13 15:10:17 UTC
Hi, indeed I can confirm that the issue is not observable in swift-lang-6.2-4.fc43.x86_64. Thank you!

Comment 3 Fedora Update System 2025-12-13 17:45:25 UTC
FEDORA-2025-db571dad17 (swift-lang-6.2-4.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-db571dad17

Comment 4 Fedora Update System 2025-12-14 01:14:32 UTC
FEDORA-2025-db571dad17 has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-db571dad17`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-db571dad17

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2025-12-22 00:52:07 UTC
FEDORA-2025-db571dad17 (swift-lang-6.2-4.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.