Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc %s -fsyntax-only -verify -pedantic |
Eli Friedman | f1c7b48 | 2008-09-02 05:09:35 +0000 | [diff] [blame] | 2 | |
3 | typedef const char rchar; | ||||
4 | int a(char* a, rchar* b) { | ||||
5 | return a-b; | ||||
6 | } | ||||
Douglas Gregor | 0804888 | 2009-01-23 19:03:35 +0000 | [diff] [blame] | 7 | |
8 | // <rdar://problem/6520707> | ||||
9 | void f0(void (*fp)(void)) { | ||||
10 | int x = fp - fp; // expected-warning{{arithmetic on pointer to function type 'void (*)(void)' is a GNU extension}} | ||||
11 | } |