Fix ICE in substring-handling building 502.gcc_r (PR 87562)
[official-gcc.git] / gcc / testsuite / c-c++-common / Wunused-local-typedefs.c
blob683019d72e11d06dfb631a271cc0320760d66624
1 /* Origin PR c++/33255
2 { dg-options "-Wunused-local-typedefs" }
3 { dg-do compile }
4 */
6 void
7 test_warn ()
9 typedef int foo; // { dg-warning "locally defined but not used" }
12 void
13 test0 ()
15 typedef int foo;
16 foo var __attribute__((unused));
19 void
20 test1 ()
22 typedef int foo;
23 const foo *var = 0;
26 void
27 test2 ()
29 typedef int foo;
30 void func(foo);
33 void
34 test7 (void)
36 typedef int foo;
37 int vec[1] = {sizeof (foo)};
40 void
41 test8 (void)
43 typedef int foo __attribute__((used));