We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b00e0d2 commit f40dea1Copy full SHA for f40dea1
clang/lib/Headers/opencl-c-base.h
@@ -697,7 +697,16 @@ template <typename _Tp> struct __remove_address_space<__constant _Tp> {
697
#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_1_2)
698
// OpenCL v1.2 s6.12.13, v2.0 s6.13.13 - printf
699
700
-int printf(__constant const char* st, ...) __attribute__((format(printf, 1, 2)));
+#ifdef __OPENCL_CPP_VERSION__
701
+#define CLINKAGE extern "C"
702
+#else
703
+#define CLINKAGE
704
+#endif
705
+
706
+CLINKAGE int printf(__constant const char *st, ...)
707
+ __attribute__((format(printf, 1, 2)));
708
709
+#undef CLINKAGE
710
#endif
711
712
#ifdef cl_intel_device_side_avc_motion_estimation
0 commit comments