Skip to content

[SYCL] Fix -Wunused-template errors in headers#22583

Merged
wenju-he merged 1 commit into
intel:sycl-webfrom
wenju-he:fix-sycl-warnings.cpp
Jul 9, 2026
Merged

[SYCL] Fix -Wunused-template errors in headers#22583
wenju-he merged 1 commit into
intel:sycl-webfrom
wenju-he:fix-sycl-warnings.cpp

Conversation

@wenju-he

@wenju-he wenju-he commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

-Wunused-template was enabled under -Wall upstream (clang commit 1529d35), which now flags several static function templates in SYCL headers as unused within a single translation unit (they are only referenced from other TUs or from unevaluated contexts). Drop static from these templates, matching the fix already applied upstream for the analogous OpenMP __kmp_wait case. External linkage is fine as compiler will safely handle duplicate definitions across multiple TUs.

Fix SYCL::warnings/warnings.cpp in CMPLRLLVM-76767.

-Wunused-template was enabled under -Wall upstream (clang commit
1529d35), which now flags several `static` function templates
in SYCL headers as unused within a single translation unit (they are
only referenced from other TUs or from unevaluated contexts). Drop
`static` from these templates, matching the fix already applied
upstream for the analogous OpenMP __kmp_wait case.
External linkage is fine as compiler will safely handle duplicate
definitions across multiple TUs.

Fix SYCL::warnings/warnings.cpp in CMPLRLLVM-76767.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@wenju-he
wenju-he requested a review from a team as a code owner July 9, 2026 11:38
@wenju-he
wenju-he requested review from KseniyaTikhomirova and removed request for a team July 9, 2026 11:38

@KseniyaTikhomirova KseniyaTikhomirova left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wenju-he
wenju-he merged commit c52965f into intel:sycl-web Jul 9, 2026
@wenju-he
wenju-he deleted the fix-sycl-warnings.cpp branch July 9, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants