re PR tree-optimization/14107 (Return warnings don't work without optimizations enabled)
authorJason Merrill <jason@gcc.gnu.org>
Thu, 17 Jun 2004 21:53:45 +0000 (17:53 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 17 Jun 2004 21:53:45 +0000 (17:53 -0400)
        PR tree-optimization/14107
        * decl.c (finish_function): Warn about no return in all functions.

From-SVN: r83316

gcc/testsuite/g++.old-deja/g++.bugs/900205_03.C
gcc/testsuite/g++.old-deja/g++.mike/p646.C

index 192f2d0f952b4a8ccc29b5acf2f69b7942643d3c..b22172d104dfd45b6c253e3d0cd95f5f4e890571 100644 (file)
 struct struct00 { };
 
 int global_function_0 () {
-}                                      // { dg-error "" "" { xfail *-*-* } }
+}                                      // { dg-error "" 
 
 struct00 global_function_1 () {
-}                                      // { dg-error "" "" { xfail *-*-* } }
+}                                      // { dg-error "" 
 
 struct struct0 {
 
@@ -41,9 +41,9 @@ struct struct1 {
 };
 
 int struct1_member_function_0 () {
-}                                      // { dg-error "" "" { xfail *-*-* } }
+}                                      // { dg-error "" 
 
 struct1 struct1::struct1_member_function_1 () {
-}                                      // { dg-error "" "" { xfail *-*-* } }
+}                                      // { dg-error "" 
 
 int main () { return 0; }
index bc9a203f20c022e26cc690c58152b4d9ad54df94..6d5abcd91e52d63406688b6c2c7cb3198c63a7bc 100644 (file)
@@ -1,6 +1,5 @@
 // { dg-do assemble  }
 // { dg-options "-Wno-deprecated -Wreturn-type" }
-//
 // GROUPS passed i960
 /*
   Bug Id: bnr
@@ -102,7 +101,7 @@ warn_return_1 ()
 {
   foo f;
   printf ("returning 1\n");
-}                              // { dg-warning "" "" { xfail *-*-* } } control reaches end
+}                              // { dg-warning "" } control reaches end
 
 int
 warn_return_arg (int arg)
@@ -110,7 +109,7 @@ warn_return_arg (int arg)
   foo f;
   printf ("returning %d\n", arg);
   arg;
-}                              // { dg-warning "" "" { xfail *-*-* } } control reaches end
+}                              // { dg-warning "" } control reaches end
 
 int
 warn_return_sum (int x, int y)
@@ -118,20 +117,20 @@ warn_return_sum (int x, int y)
   foo f;
   printf ("returning %d+%d\n", x, y);
   x + y;
-}                              // { dg-warning "" "" { xfail *-*-* } } control reaches end
+}                              // { dg-warning "" } control reaches end
 
 foo
 warn_return_foo ()
 {
   foo f;
   printf ("returning foo\n");
-}                              // { dg-warning "" "" { xfail *-*-* } } control reaches end
+}                              // { dg-warning "" } control reaches end
 
 foo
 warn_foo_parm_returns_foo (foo f)
 {
   f;
-}                              // { dg-warning "" "" { xfail *-*-* } } control reaches end
+}                              // { dg-warning "" } control reaches end
 
 main ()
 {                              // { dg-warning "" } no type