etc/services - sync with NetBSD-8
[minix.git] / external / bsd / llvm / dist / clang / test / SemaOpenCL / func_ptr.cl
blobf21a3d3265a56c711b85d74989dd371ab93542ec
1 // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only
3 void foo(void*);
5 void bar()
7 // declaring a function pointer is an error
8 void (*fptr)(int); // expected-error{{pointers to functions are not allowed}}
10 // taking the address of a function is an error
11 foo((void*)foo); // expected-error{{taking address of function is not allowed}}
12 foo(&foo); // expected-error{{taking address of function is not allowed}}
14 // just calling a function is correct
15 foo(0);