-
Notifications
You must be signed in to change notification settings - Fork 795
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++
:
llvm/sycl/test/warnings/warnings.cpp
Lines 1 to 3 in b8615ff
// RUN: %clangxx -fsycl --no-system-header-prefix=sycl -fsyntax-only -Wall -Wextra -Werror -Wno-ignored-attributes -Wno-deprecated-declarations -Wpessimizing-move -Wmismatched-tags -Wno-unknown-cuda-version -Wno-unused-command-line-argument %s | |
// RUN: %clangxx -fsycl -E --no-system-header-prefix=sycl %s -o %t.ii | |
// RUN: %clangxx -fsycl -fsyntax-only -Wall -Wextra -Werror -Wno-ignored-attributes -Wno-deprecated-declarations -Wpessimizing-move -Wmismatched-tags -Wno-unknown-cuda-version -Wno-unused-command-line-argument %t.ii |
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