Commit 0ba7ab3e by Neil Booth Committed by Neil Booth

* g++.dg/parse/parse5.C: New test.

From-SVN: r60750
parent 16dfd8d1
2003-01-01 Neil Booth <neil@daikokuya.co.uk>
* g++.dg/parse/parse5.C: New test.
2003-01-01 Nathanael Nerode <neroden@gcc.gnu.org>
* g++.dg/parse/parens1.C: New test.
......
/* PR c++/590 */
/* { dg-do compile } */
#include <iostream>
#include <sstream>
using namespace std;
enum ExternalEnum { EXTERNAL_VALUE = 2 };
class BadStream : public ostringstream
{
public:
enum InternalEnum { VALUE = 0 };
BadStream( InternalEnum e ) {};
BadStream( InternalEnum e, int i ) {};
};
int main()
{
( BadStream( BadStream::VALUE ) ) << "foobar" << endl;
BadStream((BadStream::InternalEnum)BadStream::VALUE ) << "foobar";
BadStream::InternalEnum in = BadStream::VALUE;
BadStream( in ) << "foobar";
BadStream( BadStream::VALUE, 0 ) << "foobar" << endl;
// This didn't used to compile:
BadStream( BadStream::VALUE ) << "foobar" << endl;
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment