Last change
on this file since 2853d6f was
2853d6f,
checked in by Michael Brooks <mlbrooks@…>, 3 weeks ago
|
Remove uses of warnings to show test success. Eliminate simple causes of other warnings from affected tests and remove the result from WFLAG_OPT_LAX.
Many affected tests also formerly used -fsyntax-only to avoid errors at later compilation stages, or at runtime. Repair such tests to actually work though runtime, and remove them from SYNTAX_ONLY_CODE.
Group tests listed under WFLAGS_OPT according to why they should receive lax treatment. Add reason WFLGAS_OPT_LAX_EXPECT_WARN and give the original list reason WFLGAS_OPT_LAX_TO_INVESTIGATE.
Tests whose purpose is to show a warning are listed as both SYNTAX_ONLY_CODE (so that the warning is the output) and WFLGAS_OPT_LAX_EXPECT_WARN (to document this fact).
|
-
Property mode set to
100644
|
File size:
1.5 KB
|
Rev | Line | |
---|
[70529dc] | 1 | typedef volatile struct Foo FooInterm; |
---|
| 2 | typedef const FooInterm Foo; |
---|
| 3 | #ifdef ERR1 |
---|
| 4 | typedef struct Foo Foo; |
---|
| 5 | #endif |
---|
| 6 | |
---|
| 7 | typedef int ** pt; |
---|
| 8 | typedef int ** pt; |
---|
| 9 | |
---|
| 10 | #ifdef __CFA__ |
---|
| 11 | extern "C" { |
---|
| 12 | #endif |
---|
| 13 | typedef int __io_read_fn ( char buf); |
---|
| 14 | typedef int __io_write_fn ( const char buf); |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | __io_read_fn read; |
---|
| 18 | __io_write_fn write; |
---|
| 19 | #ifdef __CFA__ |
---|
| 20 | } |
---|
| 21 | #endif |
---|
| 22 | |
---|
| 23 | int sz; |
---|
| 24 | typedef int FUNC(int, ...); |
---|
| 25 | typedef int FUNC(int, ...); |
---|
| 26 | |
---|
| 27 | typedef int ARR[]; |
---|
| 28 | typedef int ARR[]; |
---|
[66812dd] | 29 | #ifdef ERR1 |
---|
| 30 | // if a typedef has an array dimension, it can only be redefined to the same dimension |
---|
[70529dc] | 31 | typedef int ARR[2]; |
---|
[66812dd] | 32 | #endif |
---|
[70529dc] | 33 | |
---|
[81e768d] | 34 | typedef [ float[], char[], int[] ] ARRSa; |
---|
| 35 | typedef [ float[], char[], int[] ] ARRSa; |
---|
| 36 | #ifdef ERR1 |
---|
| 37 | typedef [ float[], char[2], int[] ] ARRSa; |
---|
| 38 | #endif |
---|
| 39 | |
---|
| 40 | typedef int ARRSb[][1][2][3]; |
---|
| 41 | typedef int ARRSb[][1][2][3]; |
---|
| 42 | #ifdef ERR1 |
---|
| 43 | typedef int ARRSb[][1][2][99]; |
---|
| 44 | #endif |
---|
| 45 | |
---|
[70529dc] | 46 | typedef int X; |
---|
| 47 | typedef int Y; |
---|
| 48 | typedef Y Y2; |
---|
| 49 | typedef X X2; |
---|
| 50 | |
---|
| 51 | typedef Y2 Z; |
---|
| 52 | typedef X2 Z; |
---|
| 53 | |
---|
| 54 | typedef Z X2; |
---|
| 55 | typedef int X2; |
---|
| 56 | typedef Z X2; |
---|
| 57 | typedef int X2; |
---|
| 58 | |
---|
[1d61b67] | 59 | X2 value __attribute__((aligned(4 * sizeof(X2)))); |
---|
| 60 | |
---|
| 61 | __attribute__((aligned(4 * sizeof(X2)))) struct rseq_cs { |
---|
| 62 | int foo; |
---|
| 63 | }; |
---|
| 64 | |
---|
[70529dc] | 65 | // xxx - this doesn't work yet due to parsing problems with generic types |
---|
| 66 | // #ifdef __CFA__ |
---|
| 67 | // typedef forall(type T) void foo(T); |
---|
| 68 | // typedef forall(type T) void foo(T); |
---|
| 69 | // typedef forall(type S) void foo(S); // should be allowed to do this... |
---|
| 70 | // #endif |
---|
| 71 | |
---|
| 72 | int main() { |
---|
[66812dd] | 73 | typedef int ARR[sz]; |
---|
[70529dc] | 74 | |
---|
[66812dd] | 75 | // can't redefine typedef which is VLA |
---|
[70529dc] | 76 | #if ERR1 |
---|
[66812dd] | 77 | typedef int ARR[sz]; |
---|
[70529dc] | 78 | #endif |
---|
| 79 | |
---|
[2853d6f] | 80 | Foo * x; (void) x; |
---|
[66812dd] | 81 | |
---|
| 82 | typedef struct Bar Foo; |
---|
[2853d6f] | 83 | Foo * y; (void) y; |
---|
[70529dc] | 84 | |
---|
[66812dd] | 85 | typedef int *** pt; |
---|
[70529dc] | 86 | |
---|
[2853d6f] | 87 | printf("done\n"); |
---|
[70529dc] | 88 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.