diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-06-03 15:20:48 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-06-03 15:20:48 +0000 |
| commit | 551c698530debaae81139c7c76a29fb762793362 (patch) | |
| tree | 547e0e59163c33f2142998714eb5f957e65d1a57 /test/SemaOpenCL/func.cl | |
| parent | 416ada0f75bab22b084a1776deb229cd4a669c4d (diff) | |
Notes
Diffstat (limited to 'test/SemaOpenCL/func.cl')
| -rw-r--r-- | test/SemaOpenCL/func.cl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/SemaOpenCL/func.cl b/test/SemaOpenCL/func.cl index ea3bab6c514c..dc5b44057b19 100644 --- a/test/SemaOpenCL/func.cl +++ b/test/SemaOpenCL/func.cl @@ -4,8 +4,15 @@ void vararg_f(int, ...); // expected-error {{invalid prototype, variadic arguments are not allowed in OpenCL}} void __vararg_f(int, ...); typedef void (*vararg_fptr_t)(int, ...); // expected-error {{invalid prototype, variadic arguments are not allowed in OpenCL}} + // expected-error@-1{{pointers to functions are not allowed}} int printf(__constant const char *st, ...); // expected-error {{invalid prototype, variadic arguments are not allowed in OpenCL}} +// Struct type with function pointer field +typedef struct s +{ + void (*f)(struct s *self, int *i); // expected-error{{pointers to functions are not allowed}} +} s_t; + //Function pointer void foo(void*); |
