blob: b801f81473b3c1d3faacd24cb7336e6edc52eb78 [file] [log] [blame]
Daniel Dunbar8fbe78f2009-12-15 20:14:24 +00001// RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic
Eli Friedmane7175d82008-09-02 05:09:35 +00002
3typedef const char rchar;
4int a(char* a, rchar* b) {
5 return a-b;
6}
Douglas Gregor5da47ad2009-01-23 19:03:35 +00007
8// <rdar://problem/6520707>
9void f0(void (*fp)(void)) {
Chandler Carruthc9332212011-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 Gregor5da47ad2009-01-23 19:03:35 +000011}