re PR c++/38 (matching of function signatures)

PR c++/38
	* g++.dg/parse/array-size1.C: New test.

	PR c++/5657
	* g++.dg/parse/undefined3.C: New test.

	PR c++/5665
	* g++.dg/parse/undefined4.C: New test.

	PR c++/5975
	* g++.dg/parse/undefined5.C: New test.

	PR c++/7259
	* g++.dg/parse/tmpl-tmpl-param1.C: New test.

	PR c++/8578
	* g++.dg/parse/casting-operator1.C: New test.

	PR c++/8596
	* g++.dg/parse/undefined6.C: New test.

	PR c++/8736
	* g++.dg/parse/missing-template1.C: New test.

From-SVN: r62409
This commit is contained in:
Volker Reichelt 2003-02-04 22:42:34 +00:00
parent 52b62c0e1a
commit 2de2cd7851
9 changed files with 114 additions and 1 deletions

View File

@ -1,3 +1,29 @@
2003-02-04 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/38
* g++.dg/parse/array-size1.C: New test.
PR c++/5657
* g++.dg/parse/undefined3.C: New test.
PR c++/5665
* g++.dg/parse/undefined4.C: New test.
PR c++/5975
* g++.dg/parse/undefined5.C: New test.
PR c++/7259
* g++.dg/parse/tmpl-tmpl-param1.C: New test.
PR c++/8578
* g++.dg/parse/casting-operator1.C: New test.
PR c++/8596
* g++.dg/parse/undefined6.C: New test.
PR c++/8736
* g++.dg/parse/missing-template1.C: New test.
Tue Feb 4 21:41:09 CET 2003 Jan Hubicka <jh@suse.cz>
* gcc.dg/i386-cadd.c: Compile using -march=k8.
@ -5,7 +31,7 @@ Tue Feb 4 21:41:09 CET 2003 Jan Hubicka <jh@suse.cz>
* gcc.dg/i386-fpcvt-?.c: Likewise.
* gcc.dg/i386-ssefp-1.c: Likewise.
* gcc.dg/i386-ssetype-?.c: Likewise; fix for register passing
convetions.
conventions.
2003-02-03 Mark Mitchell <mark@codesourcery.com>

View File

@ -0,0 +1,13 @@
// PR c++/38
// Origin: Wolfgang Bangerth <bangerth@dealii.org>
// { dg-do compile }
template <int i> struct A
{
static const int n = 1;
typedef double X[n];
A (const X&);
};
template <int i> A<i>::A (const X&) {}

View File

@ -0,0 +1,11 @@
// PR c++/8578
// Origin: <Delana.Lorenzo@libero.it>
// { dg-do compile }
template <typename T> struct A
{
typedef typename T::X X;
operator X();
};
template <typename T> A<T>::operator typename A<T>::X () {}

View File

@ -0,0 +1,21 @@
// PR c++/8736
// Origin: Peter Kolloch <pkolloch@gmx.ne>
// { dg-do compile }
template <typename T> struct A
{
template <typename U> struct B
{
typedef int X;
};
};
template <typename T> void foo()
{
typedef typename A<T>::B<T>::X Y; // { dg-error "" }
}
void bar()
{
foo<int>();
}

View File

@ -0,0 +1,14 @@
// PR c++/7259
// Origin: Philipp Buettgenbach <P.Buettgenbach@FH-Wolfenbuettel.DE>
// Reduced version: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
// { dg-do compile }
template <template <int> class T> class A : public T<0> {};
template <typename> struct B
{
template <int> class C {};
typedef A<C> D;
};
B<void>::D d;

View File

@ -0,0 +1,6 @@
// PR c++/5657
// Origin: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
// { dg-do compile }
template<typename T> struct A { A(B); };
template<typename T> A<T>::A(B) {} // { dg-error "" }

View File

@ -0,0 +1,11 @@
// PR c++/5665
// Origin: Bergur Ragnarsson <bergur@tern.is>
// Reduced version: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
// { dg-do compile }
template<typename T> class A
{
class B { X foo(); }; // { dg-error "" }
};
template<typename T> X A<T>::B::foo() {} // { dg-error "" }

View File

@ -0,0 +1,5 @@
// PR c++/5975
// Origin: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
// { dg-do compile }
typedef typename X::Y<> y; // { dg-error "" }

View File

@ -0,0 +1,6 @@
// PR c++/8596
// Origin: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
// { dg-do compile }
template <int i> struct A {};
template <int i> struct B : A<x>{}; // { dg-error "" }