Commit 68aab9ee by Volker Reichelt Committed by Volker Reichelt

re PR c++/2738 (ICE on return type specification of a destructor)

	PR c++/2738
	* g++.dg/parse/ret-type1.C: New test.

	PR c++/3792
	* g++.dg/parse/tmpl-outside1.C: New test.

	PR c++/4207
	* g++.dg/parse/int-as-enum1.C: New test.

	PR c++/4903
	* g++.dg/parse/no-typename1.C: New test.

	PR c++/5533
	* g++.dg/parse/no-value1.C: New test.

	PR c++/5921
	* g++.dg/parse/wrong-inline1.C: New test.

	PR c++/6402
	* g++.dg/parse/ref1.C: New test.

	PR c++/6992
	* g++.dg/parse/attr-ctor1.C: New test.

	PR c++/7229
	* g++.dg/parse/namespace5.C: New test.

	PR c++/7917
	* g++.dg/parse/func-def1.C: New test.

	PR c++/8143
	* g++.dg/parse/undefined1.C: New test.

	PR c++/5723, PR c++/8522
	* g++.dg/parse/specialization1.C: New test.

	PR c++/163, PR c++/8595
	* g++.dg/parse/struct-as-enum1.C: New test.

	PR c++/9173
	* g++.dg/parse/undefined2.C: New test.

From-SVN: r61624
parent 02ba6302
2003-01-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/2738
* g++.dg/parse/ret-type1.C: New test.
PR c++/3792
* g++.dg/parse/tmpl-outside1.C: New test.
PR c++/4207
* g++.dg/parse/int-as-enum1.C: New test.
PR c++/4903
* g++.dg/parse/no-typename1.C: New test.
PR c++/5533
* g++.dg/parse/no-value1.C: New test.
PR c++/5921
* g++.dg/parse/wrong-inline1.C: New test.
PR c++/6402
* g++.dg/parse/ref1.C: New test.
PR c++/6992
* g++.dg/parse/attr-ctor1.C: New test.
PR c++/7229
* g++.dg/parse/namespace5.C: New test.
PR c++/7917
* g++.dg/parse/func-def1.C: New test.
PR c++/8143
* g++.dg/parse/undefined1.C: New test.
PR c++/5723, PR c++/8522
* g++.dg/parse/specialization1.C: New test.
PR c++/163, PR c++/8595
* g++.dg/parse/struct-as-enum1.C: New test.
PR c++/9173
* g++.dg/parse/undefined2.C: New test.
2003-01-22 Mark Mitchell <mark@codesourcery.com>
PR c++/9298
......
// PR c++/6992
// Origin: <petr@scssoft.com>
// { dg-do compile }
class A
{
__attribute__((section("whatever"))) A();
};
// PR c++/7917
// Origin: VACLAV HAISMAN <V.Haisman@sh.cvut.cz>
// { dg-do compile }
struct A
{
int i;
void foo() = 0 {} // { dg-error "" }
A() : i(0) {}
};
// PR c++/4207
// Origin: <wanderer@rsu.ru>
// { dg-do compile }
typedef int A;
enum ::A {}; // { dg-error "" }
// PR c++/7229
// { dg-do compile }
namespace A { namespace B { typedef int type; } }
typename A::B<0>::type x; // { dg-error "" }
// PR c++/4903
// Origin: Dan Marinescu <theverylittleone@hotmail.com>
// { dg-do compile }
template <typename T> struct A
{
template <typename U> struct B
{
A<T>::template B<U> foo(); // { dg-error "" }
};
};
// PR c++/5533
// { dg-do compile }
namespace N
{
template <class T> struct A{};
}
template <class T> void foo(T) {}
void bar()
{
foo(N::A); // { dg-error "" }
}
// PR c++/6402
// Origin: Wolfgang Bangerth <wolfgang@dealii.org>
// { dg-do compile }
class A
{
A (const A&);
public:
A();
};
struct B { A a; };
struct C : public B
{
void foo() { const A &ref = B::a; } // taking reference, not a copy!
};
// PR c++/2738
// Origin: Wolfgang Bangerth <wolfgang.bangerth@iwr.uni-heidelberg.de>
// { dg-do compile }
template <int i> class A
{
class C { C(); };
};
template <int i> void A<i>::C::C () {} // { dg-error "return type" }
// PR c++/5723, PR c++/8522
// Origin: Matthias Kleinmann, Peter Karl Mueller <peter.karl.mueller@gmx.de>
// { dg-do compile }
template <typename T> class A;
template <typename T> class A<T>::B; // { dg-error "declaration" }
// PR c++/163, PR c++/8595
// Origin: <martin@loewis.home.cs.tu-berlin.de>, Mark Leone <mleone@pixar.com>
// { dg-do compile }
namespace N
{
struct A {};
}
typedef enum N::A B; // { dg-error "enum" }
// PR c++/3792
// Origin: <david.abrahams@rcn.com>
// { dg-do compile }
struct X
{
template <int i> struct Y {};
};
typedef X::template Y<0> y; // { dg-error "template" }
// PR c++/8143
// { dg-do compile }
struct foo
{
X x; // { dg-error "" }
foo(X) {} // { dg-error "" }
foo(X y, int) : x() {} // { dg-error "" }
};
// PR c++/9173
// Origin: <wwieser@gmx.de>
// { dg-do compile }
class A {};
class B
{
void foo(int,A::X); // { dg-error "" }
};
void B::foo(int,A::X) {} // { dg-error "" }
// PR c++/5921
// Origin: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
// { dg-do compile }
struct A
{
struct B { B(); };
};
static A::B b;
inline template <int i> void f (); // { dg-error "" }
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