+2000-10-06 Richard Henderson <rth@cygnus.com>
+
+ * g++.old-deja/g++.brendan/crash13.C: Pass -Wreturn-type.
+ * g++.old-deja/g++.brendan/crash52.C: Likewise.
+ * g++.old-deja/g++.jason/report.C: Likewise.
+ * g++.old-deja/g++.law/friend5.C: Likewise.
+ * g++.old-deja/g++.mike/p646.C: Likewise. Adjust the spelling
+ of the expected warnings.
+
2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.pt/enum14.C: New test.
*/
-// Special g++ Options: -Wno-deprecated
+// Special g++ Options: -Wno-deprecated -Wreturn-type
extern "C"
{
{
foo f;
printf ("returning 1\n");
-} // WARNING - no return statement
+} // WARNING - control reaches end
int
warn_return_arg (int arg)
foo f;
printf ("returning %d\n", arg);
arg;
-} // WARNING - no return statement
+} // WARNING - control reaches end
int
warn_return_sum (int x, int y)
foo f;
printf ("returning %d+%d\n", x, y);
x + y;
-} // WARNING - no return statement
+} // WARNING - control reaches end
foo
warn_return_foo ()
{
foo f;
printf ("returning foo\n");
-} // WARNING - no return statement
+} // WARNING - control reaches end
foo
nowarn_return_named_foo () return f
warn_foo_parm_returns_foo (foo f)
{
f;
-} // WARNING - no return statement
+} // WARNING - control reaches end
main ()
-{
+{ // WARNING - no type
int ii = return_1 ();
if (ii != 1)
abort_because ("wrong value returned");