mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-19 06:58:54 +08:00
new
From-SVN: r28559
This commit is contained in:
parent
cfe2d2e7f5
commit
446588abcb
17
gcc/testsuite/g++.old-deja/g++.other/ptrmem5.C
Normal file
17
gcc/testsuite/g++.old-deja/g++.other/ptrmem5.C
Normal file
@ -0,0 +1,17 @@
|
||||
// Bug: g++ doesn't see that A is a vbase of C.
|
||||
// Submitted by Jason Merrill <jason@cygnus.com>
|
||||
// Build don't link:
|
||||
|
||||
struct A {
|
||||
int i;
|
||||
void f ();
|
||||
};
|
||||
|
||||
struct B: public A { };
|
||||
struct C: public virtual B { };
|
||||
|
||||
void g ()
|
||||
{
|
||||
int C::*p = &A::i; // ERROR - conversion from vbase
|
||||
void (C::*fp)() = &A::f; // ERROR - conversion from vbase
|
||||
}
|
12
gcc/testsuite/g++.old-deja/g++.other/shadow1.C
Normal file
12
gcc/testsuite/g++.old-deja/g++.other/shadow1.C
Normal file
@ -0,0 +1,12 @@
|
||||
// Bug: g++ thinks that the i in g() shadows the parm from f()
|
||||
// Contributed by Jason Merrill <jason@cygnus.com>
|
||||
// Build don't link:
|
||||
|
||||
void f (int i)
|
||||
{
|
||||
struct A {
|
||||
void g () {
|
||||
int i;
|
||||
}
|
||||
};
|
||||
}
|
14
gcc/testsuite/g++.old-deja/g++.other/virtual6.C
Normal file
14
gcc/testsuite/g++.old-deja/g++.other/virtual6.C
Normal file
@ -0,0 +1,14 @@
|
||||
// Bug: g++ checks certain non-virtual functions to see if they override
|
||||
// virtual functions.
|
||||
// Submitted by Jason Merrill <jason@cygnus.com>
|
||||
// Special g++ Options: -Woverloaded-virtual
|
||||
// Build don't link:
|
||||
|
||||
struct A {
|
||||
virtual void f (int);
|
||||
};
|
||||
|
||||
struct B: public A {
|
||||
static void f ();
|
||||
void f (int);
|
||||
};
|
6
gcc/testsuite/g++.old-deja/g++.pt/ehspec1.C
Normal file
6
gcc/testsuite/g++.old-deja/g++.pt/ehspec1.C
Normal file
@ -0,0 +1,6 @@
|
||||
// Bug: g++ forgets to instantiate A<int>
|
||||
// Contributed by Jason Merrill <jason@cygnus.com>
|
||||
// Build don't link:
|
||||
|
||||
template <class T> struct A { };
|
||||
void f () throw (A<int>);
|
Loading…
Reference in New Issue
Block a user