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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to