x
From-SVN: r28205
This commit is contained in:
parent
9f33663b8d
commit
0f03776326
@ -7,8 +7,6 @@
|
||||
// * cp-cvt.c (build_default_binary_type_conversion): Look deeper into
|
||||
// what ARG1 and ARG2 are if they're POINTER_TYPEs.
|
||||
|
||||
volatile void exit(int);
|
||||
|
||||
class CountableSet
|
||||
{
|
||||
public:
|
||||
@ -71,7 +69,7 @@ class SimpleSet : virtual public MutSet<T>
|
||||
SimpleSet()
|
||||
{
|
||||
size = 0;
|
||||
array = ((void*)0) ; // ERROR - implicit conversion
|
||||
array = 0;
|
||||
}
|
||||
int Get(int p, T& t)
|
||||
{
|
||||
|
24
gcc/testsuite/g++.old-deja/g++.ext/addrfunc4.C
Normal file
24
gcc/testsuite/g++.old-deja/g++.ext/addrfunc4.C
Normal file
@ -0,0 +1,24 @@
|
||||
// Test that an object-dependent reference to a member function can be
|
||||
// used to produce a pointer to member function, as in VC++.
|
||||
// Contributed by Jason Merrill <jason@cygnus.com>
|
||||
// Special g++ Options: -fpermissive -w
|
||||
|
||||
struct A
|
||||
{
|
||||
int f(int a) { }
|
||||
void f(int a, int b) { }
|
||||
};
|
||||
|
||||
typedef int (A::* pmf1)(int);
|
||||
typedef void (A::* pmf2)(int, int);
|
||||
|
||||
int main()
|
||||
{
|
||||
A a;
|
||||
pmf1 fn1;
|
||||
pmf2 fn2;
|
||||
|
||||
fn1 = a.f;
|
||||
fn1 = (pmf1)a.f;
|
||||
fn2 = (pmf2)a.f;
|
||||
};
|
@ -1,6 +1,6 @@
|
||||
// Build don't link:
|
||||
|
||||
inline void strlen (const char *) { }
|
||||
static inline void strlen (const char *) { }
|
||||
|
||||
void f ()
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
// support, because it doesn't support variadic functions.
|
||||
|
||||
// Special g++ Options: -fvtable-thunks
|
||||
// excess errors test - XFAIL mips*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff m68k-motorola-sysv m88k-motorola-sysv3 mn10300-*-* mn10200-*-* v850-*-* sh-*-*-*
|
||||
// excess errors test - XFAIL mips*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff m68k-motorola-sysv m88k-motorola-sysv3 mn10300-*-* mn10200-*-* v850-*-* sh-*-*
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Build don't link:
|
||||
// Special g++ Options:
|
||||
|
||||
volatile void abort();
|
||||
volatile void abort(); // WARNING - mismatch
|
||||
volatile void oink() {
|
||||
abort() ;
|
||||
} // gets bogus error -
|
||||
|
@ -4,7 +4,7 @@
|
||||
// the type of the argument -- but because it is non-const.
|
||||
|
||||
struct A {
|
||||
operator const char *() const;
|
||||
operator const char *() const { return ""; }
|
||||
};
|
||||
|
||||
struct B : public A {
|
||||
@ -14,5 +14,10 @@ struct B : public A {
|
||||
int main()
|
||||
{
|
||||
B b;
|
||||
(const char *)b; // WARNING - surprising overload resolution
|
||||
if ((const char *)b != 0) // WARNING - surprising overload resolution
|
||||
return 1;
|
||||
if ((const char *)(const B)b == 0)
|
||||
return 2;
|
||||
if ((const char *)(const B &)b == 0)
|
||||
return 3;
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ public:
|
||||
operator S () { return a*20; }
|
||||
};
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
A<int, 5> a;
|
@ -1,6 +1,6 @@
|
||||
// On targets that don't support weak symbols, we require an explicit
|
||||
// instantiation of arr.
|
||||
// excess errors test - XFAIL *-*-aout *-*-coff *-*-hpux*
|
||||
// excess errors test - XFAIL *-*-aout *-*-coff *-*-hpux* alpha-dec-osf*
|
||||
|
||||
template<class T>
|
||||
struct A {
|
||||
|
Loading…
Reference in New Issue
Block a user