aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Sema/pointer-subtract-compat.c
blob: 11e29db972bc9ace0239bec97eb5270fbc454863 (plain)
1
2
3
4
5
6
7
8
9
10
// RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic

typedef const char rchar;
int a(char* a, rchar* b) {
  return a-b;
}

void f0(void (*fp)(void)) {
  int x = fp - fp; // expected-warning{{arithmetic on pointers to the function type 'void (void)' is a GNU extension}}
}