blob: b801f81473b3c1d3faacd24cb7336e6edc52eb78 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic
Eli Friedmanf1c7b482008-09-02 05:09:35 +00002
3typedef const char rchar;
4int a(char* a, rchar* b) {
5 return a-b;
6}
Douglas Gregor08048882009-01-23 19:03:35 +00007
8// <rdar://problem/6520707>
9void f0(void (*fp)(void)) {
Chandler Carruth13b21be2011-06-27 08:02:19 +000010 int x = fp - fp; // expected-warning{{arithmetic on pointers to the function type 'void (void)' is a GNU extension}}
Douglas Gregor08048882009-01-23 19:03:35 +000011}