intel / intel/llvm

[Tests] Improve tests about warning-free SYCL headers

Open
#15,081 0 comments 0 reactions 0 assignees View on GitHub
confirmed enhancement good first issue
Dominant language
LLVM
Stars
1.5k
Forks
854
Avg merge
3d 17h
Merged PRs (30d)
137

Description

### Is your feature request related to a problem? Please describe

This is prompted by discussion we had in #15064: we already have some testing to check that SYCL headers are warning-free, but it can always be improved. In particular, we allow to use a 3rd party compiler to build host part of SYCL applications and in that phase/mode SYCL headers are not considered to be system headers, so any warnings coming out of them may break `-Werror` builds or just annoy users polluting their build logs.

### Describe the solution you would like

As a first step, we should copy existing `warnings.cpp` test and compile it using `gcc` instead of `clang++`:

https://github.com/intel/llvm/blob/b8615ffe6065992147b41359bcb4646e22f7a432/sycl/test/warnings/warnings.cpp#L1-L3

Going forward, this (and existing) tests could be further expanded, but having a test with `gcc` would be already a good start.

### Describe alternatives you have considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.