Skip to content

[SYCL] Fix g++ host-compiler build after 31945d82be43 - #22849

Merged
againull merged 1 commit into
intel:syclfrom
wenju-he:cmplrllvm-77354-sampler-deprecated-gcc
Aug 2, 2026
Merged

[SYCL] Fix g++ host-compiler build after 31945d82be43#22849
againull merged 1 commit into
intel:syclfrom
wenju-he:cmplrllvm-77354-sampler-deprecated-gcc

Conversation

@wenju-he

@wenju-he wenju-he commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Fix sycl-in-tree::Complexsycl_complex_include_order.cpp and sycl-in-tree::Regressionfsycl-host-compiler.cpp tests that broke after commit 31945d8 which deprecated the sampler class and access targets.

The commit used __SYCL_DEPRECATED which unconditionally expands to [[deprecated(...)]] on all compilers. When compiled with g++ (via -fsycl-host-compiler=g++) versions prior to GCC 13, mixing attribute((visibility("default"))) with [[deprecated(...)]] on a class declaration causes a parse error. Use __SYCL2020_DEPRECATED instead, which is gated on SYCL_LANGUAGE_VERSION == 202012L and matches the pattern used by other SYCL 2020 deprecations in the same files.

Fixes: CMPLRLLVM-77354

Fix sycl-in-tree::Complex~sycl_complex_include_order.cpp and
sycl-in-tree::Regression~fsycl-host-compiler.cpp tests that broke after
commit 31945d8 which deprecated the sampler class and access targets.

The commit used __SYCL_DEPRECATED which unconditionally expands to
[[deprecated(...)]] on all compilers. When compiled with g++ (via
-fsycl-host-compiler=g++) versions prior to GCC 13, mixing
__attribute__((visibility("default"))) with [[deprecated(...)]] on a
class declaration causes a parse error. Use __SYCL2020_DEPRECATED
instead, which is gated on SYCL_LANGUAGE_VERSION == 202012L and matches
the pattern used by other SYCL 2020 deprecations in the same files.

Fixes: CMPLRLLVM-77354

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wenju-he
wenju-he requested a review from a team as a code owner August 1, 2026 11:00
@wenju-he
wenju-he requested a review from againull August 1, 2026 11:00
@againull
againull merged commit 10c662e into intel:sycl Aug 2, 2026
30 of 31 checks passed
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.

3 participants