xref: /minix3/external/bsd/llvm/dist/clang/test/Sema/pointer-subtract-compat.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1 // RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic
2 
3 typedef const char rchar;
a(char * a,rchar * b)4 int a(char* a, rchar* b) {
5   return a-b;
6 }
7 
8 // <rdar://problem/6520707>
f0(void (* fp)(void))9 void f0(void (*fp)(void)) {
10   int x = fp - fp; // expected-warning{{arithmetic on pointers to the function type 'void (void)' is a GNU extension}}
11 }
12