Last change
on this file since 43299af was
0bf03ba2,
checked in by Michael Brooks <mlbrooks@…>, 4 weeks ago
|
Remove warnings due to unused parameters in generated code for zero-length ttype instantiations.
|
-
Property mode set to
100644
|
File size:
666 bytes
|
Line | |
---|
1 | // autogens for zero fields won't touch their parameters |
---|
2 | struct Unit {}; |
---|
3 | |
---|
4 | // a compound literal in an unevaluated context isn't accessed |
---|
5 | struct Thing { int x; }; |
---|
6 | void f() { |
---|
7 | ( typeof( (Thing){} ) * ) 0p; |
---|
8 | } |
---|
9 | |
---|
10 | // layoutof my_array doesn't need alignof N |
---|
11 | forall( [N] ) |
---|
12 | struct my_array { |
---|
13 | float strides[N]; |
---|
14 | }; |
---|
15 | |
---|
16 | // generated type_name function only needs its parameter as a tag |
---|
17 | enum () foo_t { foo }; |
---|
18 | |
---|
19 | // on empty tuple, __cleanup_dtor takes zero actions on its param and |
---|
20 | // _thunk's purpose is to ignore its param |
---|
21 | forall( Args... | { void foo( Args ); } ) |
---|
22 | void wrap( Args ) {} |
---|
23 | void foo() {} |
---|
24 | void callWrap() { |
---|
25 | wrap(); |
---|
26 | } |
---|
27 | |
---|
28 | |
---|
29 | int main() { |
---|
30 | printf( "done\n" ); |
---|
31 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.