This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR 12603 testcase


Sorry I sent this to the wrong list.

2008/10/20 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>  I would like to commit the following testcase to ensure we do not
> regress for PR 12603.
>
> OK for trunk?
>
> 2008-10-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
>
>        PR 12603
>        * gcc.dg/pr12603.c: New testcase.
>
Index: gcc/testsuite/gcc.dg/pr12603.c
===================================================================
--- gcc/testsuite/gcc.dg/pr12603.c	(revision 0)
+++ gcc/testsuite/gcc.dg/pr12603.c	(revision 0)
@@ -0,0 +1,8 @@
+/* PR 12603: No return statement warning on function that never returns with -O3. */
+/* { dg-do compile } */
+/* { dg-options "-O3 -Wall -Wextra -Wreturn-type -Wunreachable-code" } */
+int
+this_function_never_returns ()
+{
+  for (;;);
+}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]