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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [parse/] [parse5.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
/* PR c++/590 */
2
/* { dg-do compile } */
3
 
4
#include 
5
#include 
6
using namespace std;
7
 
8
enum ExternalEnum { EXTERNAL_VALUE = 2 };
9
 
10
class BadStream : public ostringstream
11
{
12
public:
13
  enum InternalEnum { VALUE = 0 };
14
  BadStream( InternalEnum e ) {}
15
  BadStream( InternalEnum e, int i ) {}
16
};
17
 
18
int main()
19
{
20
  ( BadStream( BadStream::VALUE ) ) << "foobar" << endl;
21
 
22
  BadStream((BadStream::InternalEnum)BadStream::VALUE ) << "foobar";
23
 
24
  BadStream::InternalEnum in = BadStream::VALUE;
25
  BadStream( in ) << "foobar";
26
 
27
  BadStream( BadStream::VALUE, 0 ) << "foobar" << endl;
28
 
29
  // This didn't used to compile:
30
  BadStream( BadStream::VALUE ) << "foobar" << endl;
31
 
32
  return 0;
33
}

powered by: WebSVN 2.1.0

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