On Thu, Mar 10, 2011 at 05:14:12PM +0100, Dodji Seketeli wrote: > --- /dev/null > +++ b/gcc/testsuite/g++.dg/inherit/virtual8.C ... > + > +int > +main () > +{ > + char *v = new char[sizeof (E) + 16]; > + memset (v, 0x55, sizeof (E) + 16); > + E *e = new (v) E (); > + e->~E (); > + > + for (unsigned i = sizeof (E); i < sizeof (E) + 16; ++i) > + if (v[i] != 0x55) > + return 1; > + > + delete[] v; > + return 0; > +}
The standard way of signalizing a test failure is calling abort (), not returning 1, see http://gcc.gnu.org/codingconventions.html (Testsuite Conventions). While exit (0); isn't widely used for testcase success (and return 0; can be omitted at the end of main in C++ or C99), abort as the method of signalizing failure is the norm. Jakub