syntax1.C: New test.

* g++.old-deja/g++.pt/syntax1.C: New test.
	* g++.old-deja/g++.pt/syntax2.C: New test.
	* g++.old-deja/g++.other/syntax3.C: New test.
	* g++.old-deja/g++.other/syntax4.C: New test.

From-SVN: r34708
This commit is contained in:
Nathan Sidwell 2000-06-26 11:07:20 +00:00 committed by Nathan Sidwell
parent 0404d86f34
commit 51a5a5e0ef
5 changed files with 107 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.pt/syntax1.C: New test.
* g++.old-deja/g++.pt/syntax2.C: New test.
* g++.old-deja/g++.other/syntax3.C: New test.
* g++.old-deja/g++.other/syntax4.C: New test.
2000-06-25 Zack Weinberg <zack@wolery.cumb.org>
* gcc.dg/20000623-1.c: Prototype exit and abort.

View File

@ -0,0 +1,21 @@
// Build don't link:
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 22 June 2000 <nathan@codesourcery.com>
// Origin GNATS bug report 262 from Jeremy Sanders <jss@ast.cam.ac.uk>
// and several others. With templates, it's very easy to say something
// erroneous like
// template class X::X<whatever>
// The culprit
// ... class X::X ...
// caused us to ICE as we got confused about pushing and popping scopes.
class X
{
public:
X();
};
class X::X () {} // ERROR - parse error
X::X () {}

View File

@ -0,0 +1,26 @@
// Build don't link:
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 22 June 2000 <nathan@codesourcery.com>
// Origin GNATS bug report 262 from Jeremy Sanders <jss@ast.cam.ac.uk>
// and several others. With templates, it's very easy to say something
// erroneous like
// template class X::X<whatever>
// The culprit
// ... class X::X ...
// caused us to ICE as we got confused about pushing and popping scopes.
class X {
X ();
};
class Y {
public:
typedef ::X W;
class Z;
};
class Y::Z {};
class Y::W () {} // ERROR - parse error
Y::W::X () {}

View File

@ -0,0 +1,26 @@
// Build don't link:
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 22 June 2000 <nathan@codesourcery.com>
// Origin GNATS bug report 262 from Jeremy Sanders <jss@ast.cam.ac.uk>
// and several others. With templates, it's very easy to say something
// erroneous like
// template class X::X<whatever>
// The culprit
// ... class X::X ...
// caused us to ICE as we got confused about pushing and popping scopes.
class Y
{
public:
template <class T> Y(T &);
};
template <class T> Y::Y(T &) {}
template class Y::Y (int); // ERROR - parse error
template Y::Y (int); // ERROR - template-id does not match
template Y::Y (int &);

View File

@ -0,0 +1,27 @@
// Build don't link:
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 22 June 2000 <nathan@codesourcery.com>
// Origin GNATS bug report 262 from Jeremy Sanders <jss@ast.cam.ac.uk>
// and several others. With templates, it's very easy to say something
// erroneous like
// template class X::X<whatever>
// The culprit
// ... class X::X ...
// caused us to ICE as we got confused about pushing and popping scopes.
template <class T> class image
{
public:
template <class U> image(const image<U> &copy);
};
template <class T> template <class U> image<T>::image(const image<U> &copy)
{
}
template class image<double>;
template class image<double>::image (const image<int> &); // ERROR - parse error
template class image<double>::image (image<int>); // ERROR - specified as declarator-id
template image<double>::image (const image<int> &);