OSDN Git Service

link, expect link errors
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.brendan / parse3.C
1 // Build don't link: 
2 // crash test
3
4 // these are marked as expected errors because they evidence an
5 // ambiguity in the grammar between expressions and declarations.
6 // when the parser's been cleaned up or rewritten, these two error
7 // markers can go away, since they'll no longer occur.
8
9 class A
10 {
11   public:
12     int high;
13     unsigned int low;
14     A operator+(const A in);
15 };
16
17 A A::operator+(const A in)
18 {
19     if (high==0)
20       return A();    // this works
21     else
22       return (A());  // this works not // gets bogus error - XFAIL *-*-* 
23 }