Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s |
Steve Naroff | ad7ef48 | 2007-08-25 14:37:06 +0000 | [diff] [blame] | 2 | _Complex double X; |
| 3 | void test1(int c) { |
| 4 | X = 5; |
| 5 | } |
| 6 | void test2() { |
| 7 | int i; |
| 8 | double d = i; |
| 9 | double _Complex a = 5; |
| 10 | |
| 11 | test1(a); |
| 12 | a = 5; |
| 13 | d = i; |
| 14 | } |
| 15 | int test3() { |
| 16 | int a[2]; |
Douglas Gregor | d4eea83 | 2010-04-09 00:35:39 +0000 | [diff] [blame] | 17 | a[0] = test3; // expected-warning{{incompatible pointer to integer conversion assigning to 'int' from 'int ()'}} |
Mike Stump | d1969d8 | 2009-07-22 00:43:08 +0000 | [diff] [blame] | 18 | return 0; |
Steve Naroff | ad7ef48 | 2007-08-25 14:37:06 +0000 | [diff] [blame] | 19 | } |
| 20 | short x; void test4(char c) { x += c; } |
| 21 | int y; void test5(char c) { y += c; } |