diff gcc/testsuite/gcc.dg/return-type-1.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gcc/testsuite/gcc.dg/return-type-1.c	Fri Oct 27 22:46:09 2017 +0900
@@ -0,0 +1,9 @@
+/* Missing warning for falling off the end of a non-void function.
+   egcs-1.1.2 passes, egcs-ss-19990428 fails.
+   http://gcc.gnu.org/ml/gcc-bugs/1999-03n/msg00221.html */
+/* { dg-do compile } */
+/* { dg-options "-O -Wreturn-type" } */
+int
+foo(void)
+{
+} /* { dg-warning "control reaches end of non-void function" "warning for falling off end of non-void function" } */