Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git] / gcc / testsuite / g++.dg / parse / defarg4.C
blob151f6c5f668b071d5981d497335782ff89088df5
1 // { dg-do compile }
3 // Copyright (C) 2003 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 3 Jul 2003 <nathan@codesourcery.com>
6 // PR c++ 9162. default args got left unprocessed
8 struct S {
9   friend int foo (const S&, int = 100);
11 S s;
12 int i = foo (s);
14 struct R
16   template <typename T> R (T, int = 0);
19 int Foo ()
21   R s (1);
22   return 0;
25 template <typename T> struct Q
27   int Foo (T, int = 0);
30 int Foo (Q<int> *s)
32   s->Foo (1);
33   return 1;