OSDN Git Service

PR preprocessor/30805:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / 20030906-1.c
index 57d80f0..c416f55 100644 (file)
@@ -2,7 +2,7 @@
    Copyright (C) 2003 Free Software Foundation Inc.  */
 
 /* { dg-do compile } */
-/* { dg-options "-O -finline-functions -Wextra" } */
+/* { dg-options "-O -finline-functions -Wreturn-type" } */
 
 extern int i;
 extern int foo (void);
@@ -12,10 +12,10 @@ int foo (void)
 {
   if( i ) return 0;
   else    return 1;
-}              /* { dg-bogus "may return with or without a value" } */
+}
 
 int bar (void)
 {
-  if( i ) return;
+  if( i ) return; /* { dg-warning "'return' with no value, in function returning non-void" } */
   else    return 1;
-}              /* { dg-warning "may return with or without a value" } */
+}