source: tests/nowarn/unused.cfa @ 0497b6ba

Last change on this file since 0497b6ba was 35cc6d4, checked in by Michael Brooks <mlbrooks@…>, 6 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.