Bug 2421964

Summary: swift build: warning: direct reference to protected function
Product: [Fedora] Fedora Reporter: Tobias <kiwi.stimmritze4i>
Component: swift-langAssignee: Link Dupont <link>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 43CC: davide, link, michel, suraj.ghimire7
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: swift-lang-6.2-4.fc43 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-12-22 00:52:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.