131
|
1 // { dg-options "-fpermissive -w" }
|
111
|
2
|
|
3 // Copyright (C) 2003 Free Software Foundation, Inc.
|
|
4 // Contributed by Nathan Sidwell 3 Jul 2003 <nathan@codesourcery.com>
|
|
5
|
|
6 // PR c++ 9162. default args got left unprocessed
|
|
7
|
|
8 struct S {
|
|
9 friend int foo (const S&, int = 100);
|
|
10 };
|
|
11 S s;
|
|
12 int i = foo (s);
|
|
13
|
|
14 struct R
|
|
15 {
|
|
16 template <typename T> R (T, int = 0);
|
|
17 };
|
|
18
|
|
19 int Foo ()
|
|
20 {
|
|
21 R s (1);
|
131
|
22 return 0;
|
111
|
23 }
|
|
24
|
|
25 template <typename T> struct Q
|
|
26 {
|
|
27 int Foo (T, int = 0);
|
|
28 };
|
|
29
|
|
30 int Foo (Q<int> *s)
|
|
31 {
|
|
32 s->Foo (1);
|
131
|
33 return 1;
|
111
|
34 }
|