Thank you for your question, this is a challenging issue and we are considering a lot of alternatives.
The diagnostics are not the big issue here, as it is possible to check all of the functions called inside a kernel.
We are considering a lot of different methods for efficiently enabling the inclusion of functions defined in multiple translation units in SYCL kernels.
This is indeed a very useful feature, which in the case of SYCL we have to provide more general answers, even if they push compiler technology harder.
In this case, we have to ensure that the solution is portable among all the different host and SYCL device compilers and platforms, unlike other models,
which enforce the usage of one compiler for all the source code.
This is not described in the current specification, but we are working on providing a solution, which would provide the maximum portability possible.