void athrow(const ANY & e) throw(ANY)
{
- throw e; // gets bogus error - discarding const - XFAIL *-*-*
+ throw e; // gets bogus error - discarding const
}
int main(void)
// Build don't link:
// Special g++ Options:
-int *foo = new int[1](0); // gets bogus error - XFAIL *-*-*
+int *foo = new int[1](0); // gets bogus error -
float f = 3;
int* b1 = new int[(int)f];
- int* b2 = new int[f];
+ int* b2 = new int[f]; // ERROR - new requires integral size
return s;
}
// Bug: g++ emits template instances when it shouldn't.
// Special g++ Options: -g -fexternal-templates
-// We mark this XFAIL for the 'collect2: ld returned 1 exit status' message.
-// excess errors test - XFAIL *-*-*
+// We mark this XFAIL because we can't test for expected linker errors.
+// If we get an XPASS for this testcase, that's a bug.
+// (OK) excess errors test - XFAIL *-*-*
#pragma implementation "irrelevant_file"
#line 1 "template18.h"
main()
{
- min (1, 1); // ERROR - undefined
+ min (1, 1); // should produce an undefined symbol error.
}
void foo() {
B x;
- dynamic_cast<D*>(&x); // gets bogus error - XFAIL *-*-*
+ dynamic_cast<D*>(&x); // WARNING - will never succeed
B* p = &x;
dynamic_cast<D*>(p);
}
};
void b() {
- goto bar; // ERROR - jump from here - XFAIL *-*-*
- X x; // ERROR - jump crosses initialization - XFAIL *-*-*
- bar: // ERROR - jump to here - XFAIL *-*-*
+ goto bar; // ERROR - jump from here
+ X x; // ERROR - jump crosses initialization
+ bar: // ERROR - jump to here
;
}
#include <vector>
void c() {
- goto bar; // ERROR - jump from here - XFAIL *-*-*
- vector<int> x; // ERROR - jump crosses initialization - XFAIL *-*-*
- bar: // ERROR - jump to here - XFAIL *-*-*
+ goto bar; // ERROR - jump from here
+ vector<int> x; // ERROR - jump crosses initialization
+ bar: // ERROR - jump to here
;
}
// test of rtti of single inheritance and multiple inheritance with
// virtual inheritance
// dynamic casting
-// Special g++ Options: -frtti -w
+// Special g++ Options: -w
#include <typeinfo>
vp = dynamic_cast<D *> (dp);
if (vp != (void *)dp) error(21);
- vp = dynamic_cast<B *> (dp);
- if (vp == (void *)dp) error(21);
+ // Ill-formed: dynamic_cast to private or ambiguous base
+ // vp = dynamic_cast<B *> (dp);
+ // if (vp == (void *)dp) error(21);
- vp = dynamic_cast<B *> (fp);
- if (vp == (void *)bbp) error(22);
+ // vp = dynamic_cast<B *> (fp);
+ // if (vp == (void *)bbp) error(22);
vp = dynamic_cast<void *> (aap);
if (vp != (void *)fp) error(23);
if (vp == (void *)bbp) error(24);
}
-