aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/parse/ambig2.C
blob: 7b000c6201e82788455c4c7865bcf16ba89f153e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// { dg-do compile }

// Copyright (C) 2003 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 6 Jan 2003 <nathan@codesourcery.com>

// PR 9212. We erroneously accepted an ill-formed
// function-declaration, rather than a variable initializer.


struct A
{
    enum E { e };
    A(E);
};

struct B
{
    enum F { f };
    B(F);
};

struct C
{
    C(A, B, A);
};

C c(A(A::e), B(B::f), A(A::e)); // This is not a function declaration