2008-07-06 Kai Tietz <kai.tietz@onevision.com>
[official-gcc.git] / gcc / testsuite / g++.dg / parse / defarg4.C
blobbafdadb9429f6e27e35244bf4f8e2c3593d127eb
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);
24 template <typename T> struct Q
26   int Foo (T, int = 0);
29 int Foo (Q<int> *s)
31   s->Foo (1);