OSDN Git Service

PR c++/30849
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / parse / ambig2.C
1 // { dg-do compile }
2
3 // Copyright (C) 2003 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 6 Jan 2003 <nathan@codesourcery.com>
5
6 // PR 9212. We erroneously accepted an ill-formed
7 // function-declaration, rather than a variable initializer.
8
9
10 struct A
11 {
12     enum E { e };
13     A(E);
14 };
15
16 struct B
17 {
18     enum F { f };
19     B(F);
20 };
21
22 struct C
23 {
24     C(A, B, A);
25 };
26
27 C c(A(A::e), B(B::f), A(A::e)); // This is not a function declaration