[clang] [Driver][SYCL] Treat C files as C++ when compiled with -fsycl (PR #200318)

Srividya Sundaram via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 2 18:07:18 PDT 2026


srividya-sundaram wrote:

> Is there a reason this should not be an error? C is a distinct language from C++ and I'm not keen on warning users that we're just going to change the language mode out from under them. This causes all kinds of confusion... like what happens if the user also passed `-std=c17` or other C-specific compiler flags?

Good point, agreed. I've updated the patch to emit an _error_ instead of a warning when a `C-type` input is detected under `-fsycl`, whether via file extension or explicit `-x c`.

https://github.com/llvm/llvm-project/pull/200318


More information about the cfe-commits mailing list