[PATCH] D17438: [OpenCL] Add Sema checks for atomics and implicit declaration
Xiuli PAN via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 23 18:34:39 PST 2016
pxli168 added a comment.
It now gives a warning for both C99 and OpenCL.
But for target SPIR it gives an err only because it treat unprototyped function as varidic function:
/// \brief Checks whether the given calling convention supports variadic
/// calls. Unprototyped calls also use the variadic call rules.
inline bool sthiupportsVariadicCall(CallingConv CC) {...}
and in OpenCL s6.9.e it says
> e. Variadic macros and functions with the exception of printf and enqueue_kernel are not supported.
If SPIR is followed this rule, then OpenCL should also give a err. But OpenCL gives only a warning.
I could not find where the following referenced
> Unprototyped calls also use the variadic call rules.
What do you think? Should we asked about if implicit declaration of function is allowed in OpenCL, and should we treat these function as variadic functions?
http://reviews.llvm.org/D17438
More information about the cfe-commits
mailing list