2 // { dg-options "-Wunused" } <-- should trigger -Wunused-local-typedefs
8 typedef int foo; // { dg-warning "locally defined but not used" }
30 typedef struct ST<T> foo;
60 typedef struct ST<int> foo;
62 const foo __attribute__((unused))&var = v;
75 int __attribute__((unused))vec[1] = {sizeof (foo)};
85 struct C0 { virtual void f(void) {}};
90 char __attribute__((unused)) v1 = static_cast<T1> (0);
91 if (reinterpret_cast<T2> (&v0));
92 unsigned* const c = 0;
93 unsigned* __attribute__((unused))v2 = const_cast<T3* const> (c);
94 C0 *__attribute__((unused))p0 = 0;
96 p0 = dynamic_cast<T4*> (p1);
104 C0 *__attribute__((unused))v = new foo;
107 template<class T, class U>
122 typedef typename ST<T>::T bar; // { dg-warning "locally defined but not used" }
123 typedef typename ST<T>::T foo; // We shouldn't warn for this one, as
129 template<class T, class U>
142 struct s { typedef int foo;}; // { dg-warning "locally defined but not used" }
143 struct t { typedef int bar;};