Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr49615.C
blobbc5182b2716d2bd176fe8ca80fa8cbf7e56f5f3b
1 /* { dg-do compile } */
2 /* { dg-options "-g" } */
4 template <class T>
5 static inline bool Dispatch (T* obj, void (T::*func) ())
7   (obj->*func) ();
8   return true;
10 class C
12   bool f (int);
13   void g ();
15 bool C::f (int n)
17   bool b;
18   switch (n)
19     {
20       case 0:
21           b = Dispatch (this, &C::g);
22       case 1:
23           b = Dispatch (this, &C::g);
24     }
26   return true;
28 void C::g ()
30   for (;;) { }