source: tests/nowarn/unused.cfa @ fb0f04d

Last change on this file since fb0f04d was 35cc6d4, checked in by Michael Brooks <mlbrooks@…>, 7 days ago

Mitigate several unused-declaration warnings in generated code.

See tests/nowarn/unused for the specific cases.

  • Property mode set to 100644
File size: 442 bytes
Line 
1// autogens for zero fields won't touch their parameters
2struct Unit {};
3
4// a compound literal in an unevaluated context isn't accessed
5struct Thing { int x; };
6void f() {
7    ( typeof( (Thing){} ) * ) 0p;
8}
9
10// layoutof my_array doesn't need alignof N
11forall( [N] )
12struct my_array {
13    float strides[N];
14};
15
16// generated type_name function only needs its parameter as a tag
17enum () foo_t { foo };
18
19
20int main() {
21    printf( "done\n" );
22}
Note: See TracBrowser for help on using the repository browser.