236
|
1 /* RUN: %clang_cc1 -fsyntax-only -std=c89 -Wimplicit-int %s -verify -Wno-strict-prototypes
|
|
2 RUN: %clang_cc1 -fsyntax-only -std=c99 %s -verify=ext -Wno-strict-prototypes
|
|
3 RUN: %clang_cc1 -fsyntax-only -std=c2x %s -verify=unsupported
|
|
4 */
|
150
|
5
|
236
|
6 foo(void) { /* expected-warning {{type specifier missing, defaults to 'int'}} \
|
|
7 ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \
|
|
8 unsupported-error {{a type specifier is required for all declarations}} */
|
150
|
9 return 0;
|
|
10 }
|
|
11
|
236
|
12 y; /* expected-warning {{type specifier missing, defaults to 'int'}} \
|
|
13 ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \
|
|
14 unsupported-error {{a type specifier is required for all declarations}} */
|
150
|
15
|
236
|
16 /* rdar://6131634 */
|
|
17 void f((x)); /* expected-warning {{type specifier missing, defaults to 'int'}} \
|
|
18 ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \
|
|
19 unsupported-error {{a type specifier is required for all declarations}} */
|
150
|
20
|
236
|
21 /* PR3702 */
|
150
|
22 #define PAD(ms10) { \
|
|
23 register i; \
|
|
24 }
|
|
25
|
|
26 #define ILPAD() PAD((NROW - tt.tt_row) * 10) /* 1 ms per char */
|
|
27
|
|
28 void
|
236
|
29 h19_insline(n) /* ext-error {{parameter 'n' was not declared, defaults to 'int'; ISO C99 and later do not support implicit int}} \
|
|
30 unsupported-error {{unknown type name 'n'}} */
|
150
|
31 {
|
236
|
32 ILPAD(); /* expected-warning {{type specifier missing, defaults to 'int'}} \
|
|
33 ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \
|
|
34 unsupported-error {{a type specifier is required for all declarations}} */
|
|
35
|
150
|
36 }
|
|
37
|
|
38 struct foo {
|
236
|
39 __extension__ __attribute__((packed)) x : 4; /* expected-warning {{type specifier missing, defaults to 'int'}} \
|
|
40 ext-error {{type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int}} \
|
|
41 unsupported-error {{unknown type name 'x'}} */
|
|
42
|
150
|
43 };
|