Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only %s -verify -pedantic |
Chris Lattner | 7a543ad | 2007-07-13 21:02:29 +0000 | [diff] [blame] | 2 | |
Chris Lattner | 35d276f | 2009-02-27 18:53:28 +0000 | [diff] [blame] | 3 | foo() { // expected-warning {{type specifier missing, defaults to 'int'}} |
Mike Stump | d1969d8 | 2009-07-22 00:43:08 +0000 | [diff] [blame^] | 4 | return 0; |
Chris Lattner | 7a543ad | 2007-07-13 21:02:29 +0000 | [diff] [blame] | 5 | } |
Chris Lattner | 35d276f | 2009-02-27 18:53:28 +0000 | [diff] [blame] | 6 | |
| 7 | y; // expected-warning {{type specifier missing, defaults to 'int'}} |
| 8 | |
| 9 | // rdar://6131634 |
| 10 | void f((x)); // expected-warning {{type specifier missing, defaults to 'int'}} |
| 11 | |
Chris Lattner | 7b5b5b4 | 2009-03-02 20:58:48 +0000 | [diff] [blame] | 12 | |
Chris Lattner | 592b67b | 2009-03-03 00:00:26 +0000 | [diff] [blame] | 13 | // PR3702 |
Chris Lattner | 7b5b5b4 | 2009-03-02 20:58:48 +0000 | [diff] [blame] | 14 | #define PAD(ms10) { \ |
| 15 | register i; \ |
| 16 | } |
| 17 | |
| 18 | #define ILPAD() PAD((NROW - tt.tt_row) * 10) /* 1 ms per char */ |
| 19 | |
| 20 | void |
| 21 | h19_insline(n) // expected-warning {{parameter 'n' was not declared, defaulting to type 'int'}} |
| 22 | { |
| 23 | ILPAD(); // expected-warning {{type specifier missing, defaults to 'int'}} |
| 24 | } |
| 25 | |
Chris Lattner | b6645dd | 2009-04-14 21:16:09 +0000 | [diff] [blame] | 26 | struct foo { |
Chris Lattner | 3f84ad2 | 2009-04-22 05:27:59 +0000 | [diff] [blame] | 27 | __extension__ __attribute__((packed)) x : 4; // expected-warning {{type specifier missing, defaults to 'int'}} |
Chris Lattner | b6645dd | 2009-04-14 21:16:09 +0000 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | |
| 31 | |
| 32 | |