Commit 04be6a22 by Jason Merrill

update

From-SVN: r20400
parent 02020185
const void *cvp;
const void func1 ()
{
return *cvp; /* ERROR - returning a value from a void function */
}
// Build don't link: // Build don't link:
// GROUPS passed operators // GROUPS passed operators
// excess errors test - XFAIL *-*-*
// (Message bugs/opr-del:4) // (Message bugs/opr-del:4)
// From: jamshid@ses.com (Jamshid Afshar) // From: jamshid@ses.com (Jamshid Afshar)
// Date: Fri, 25 Feb 94 18:44:01 CST // Date: Fri, 25 Feb 94 18:44:01 CST
......
...@@ -336,7 +336,7 @@ struct vertex { ...@@ -336,7 +336,7 @@ struct vertex {
vertex(): item(), fanout() // gets bogus error vertex(): item(), fanout() // gets bogus error
{ }; { };
vertex(const T& i): item(), fanout() // gets bogus error - XFAIL *-*-* vertex(const T& i): item(), fanout() // gets bogus error
{ }; { };
}; };
...@@ -458,7 +458,7 @@ void ...@@ -458,7 +458,7 @@ void
Graph<T>::nextV1(Pix vx, Pix& x) const Graph<T>::nextV1(Pix vx, Pix& x) const
{ {
vertex<T> *v = (vertex<T> *) vx; vertex<T> *v = (vertex<T> *) vx;
return v->fanout.next(x); // ERROR - return from void method return v->fanout.next(x);
} }
template<class T> template<class T>
......
// Build don't link:
struct foo {
operator char*() const;
};
void bar(foo a) {
delete a; // should be accepted - XFAIL *-*-*
delete[] a; // should be accepted - XFAIL *-*-*
char b[1];
delete b; // ERROR - expecting pointer type
delete[] b; // ERROR - expecting pointer type
}
// Objects must be destructed in decreasing cnt order
// Original test attributed to James Kanze <jkanze@otelo.ibmmail.com>
// execution test - XFAIL *-*-*
static int cnt;
class A {
int myCnt;
public:
A() : myCnt(cnt++) {}
~A() { if (--cnt != myCnt) abort(); }
};
void f() { static A a; /* a.myCnt == 1 */ }
class B {
int myCnt;
public:
B() : myCnt(cnt+1) { f(); ++cnt; }
~B() { if (--cnt != myCnt) abort(); }
};
static A a1; // a1.myCnt == 0
static B b1; // b1.myCnt == 2
static A a2; // a2.myCnt == 3
int main() {}
// Test for implicit typename
// Build don't link:
// Special g++ Options:
template <class T>
struct A {
protected:
typedef struct B { } B;
};
template <class T>
struct C { };
template <class T>
struct D : public A <C <T> > {
void f ()
{
B* new_entries = (B *) 0;
}
};
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
// cannot declare friend of enclosing class using its scope, works fine // cannot declare friend of enclosing class using its scope, works fine
// without scope or for definition of foo::bar::f // without scope or for definition of foo::bar::f
// //
// excess errors test - XFAIL *-*-*
class foo class foo
{ {
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
*/ */
/* (w) 4.9.97 by Kurt Garloff <K.Garloff@ping.de> */ /* (w) 4.9.97 by Kurt Garloff <K.Garloff@ping.de> */
// Special g++ Options: // Special g++ Options:
// excess errors test - XFAIL *-*-*
#include <iostream.h> #include <iostream.h>
......
...@@ -13,7 +13,7 @@ private: ...@@ -13,7 +13,7 @@ private:
template <typename T> template <typename T>
foo<T>::foo() :v(), t() {} foo<T>::foo() :v(), t() {}
template <typename T=float> // ERROR - default parm for member template template <typename T=float> // ERROR - default parm for member template XFAIL *-*-*
foo<T>::foo(vector<int> v_) :v(v_), t() {} foo<T>::foo(vector<int> v_) :v(v_), t() {}
foo<float> a; foo<float> a;
// excess errors test - XFAIL *-*-*
#include <vector.h> #include <vector.h>
#include <algo.h> #include <algo.h>
......
// Build don't link: // Build don't link:
// excess errors test - XFAIL *-*-*
// Here we declare ::S // Here we declare ::S
typedef struct s1 *S; typedef struct s1 *S;
......
// conversion ops should be treated as coming from the most derived class // conversion ops should be treated as coming from the most derived class
// for overload resolution. See [over.match.funcs]. // for overload resolution. See [over.match.funcs].
// Build don't link: // Build don't link:
// excess errors test - XFAIL *-*-*
class X { class X {
public: public:
......
//Build don't link: //Build don't link:
// the template operator!= interferes. It should be in a namespace. // the template operator!= interferes. It should be in a namespace.
// excess errors test - XFAIL *-*-*
#include <utility> #include <utility>
...@@ -13,6 +14,6 @@ struct X { ...@@ -13,6 +14,6 @@ struct X {
void void
f(X& v) { f(X& v) {
if( v.t != V1 ) { // gets bogus error - address of bitfield if( v.t != V1 ) { // complains about taking address of bitfield
} }
} }
// Another magic NULL problem. // Another magic NULL problem.
// Special g++ Options: // Special g++ Options: -w
#include <stddef.h> #include <stddef.h>
......
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