+++ /dev/null
-const void *cvp;
-
-const void func1 ()
-{
- return *cvp; /* ERROR - returning a value from a void function */
-}
// Build don't link:
// GROUPS passed operators
-// excess errors test - XFAIL *-*-*
// (Message bugs/opr-del:4)
// From: jamshid@ses.com (Jamshid Afshar)
// Date: Fri, 25 Feb 94 18:44:01 CST
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
{ };
};
Graph<T>::nextV1(Pix vx, Pix& x) const
{
vertex<T> *v = (vertex<T> *) vx;
- return v->fanout.next(x); // ERROR - return from void method
+ return v->fanout.next(x);
}
template<class T>
--- /dev/null
+// 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
+}
--- /dev/null
+// 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() {}
--- /dev/null
+// 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;
+ }
+};
// cannot declare friend of enclosing class using its scope, works fine
// without scope or for definition of foo::bar::f
//
+// excess errors test - XFAIL *-*-*
class foo
{
*/
/* (w) 4.9.97 by Kurt Garloff <K.Garloff@ping.de> */
// Special g++ Options:
+// excess errors test - XFAIL *-*-*
#include <iostream.h>
template <typename 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<float> a;
+// excess errors test - XFAIL *-*-*
+
#include <vector.h>
#include <algo.h>
-// Build don't link:
+// Build don't link:
+// excess errors test - XFAIL *-*-*
// Here we declare ::S
typedef struct s1 *S;
// conversion ops should be treated as coming from the most derived class
// for overload resolution. See [over.match.funcs].
// Build don't link:
+// excess errors test - XFAIL *-*-*
class X {
public:
//Build don't link:
// the template operator!= interferes. It should be in a namespace.
+// excess errors test - XFAIL *-*-*
#include <utility>
void
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.
-// Special g++ Options:
+// Special g++ Options: -w
#include <stddef.h>