2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.brendan / parse3.C
blob18bde916f6e7a14928f582e1ae77f152933eb9f5
1 // { dg-do assemble  }
3 // these are marked as expected errors because they evidence an
4 // ambiguity in the grammar between expressions and declarations.
5 // when the parser's been cleaned up or rewritten, these two error
6 // markers can go away, since they'll no longer occur.
8 // Fixed. PR 8545, 2001 01 23
9 class A
11   public:
12     int high;
13     unsigned int low;
14     A operator+(const A in);
17 A A::operator+(const A in)
19     if (high==0)
20       return A();    // this works
21     else
22       return (A());  // this works not