OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.brendan/] [parse3.C] - Blame information for rev 305

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { 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.