OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.brendan/] [parse3.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// { dg-do assemble  }
2
 
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.
7
 
8
// Fixed. PR 8545, 2001 01 23
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
23
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.