+2004-06-12 Jason Merrill <jason@redhat.com>
+
+ PR tree-optimization/14107
+ * decl.c (finish_function): Warn about no return in all functions.
+
2004-06-15 Paolo Bonzini <bonzini@gnu.org>
* cp-tree.h (struct language_function): Remove cannot_inline.
&& !current_function_returns_value && !current_function_returns_null
/* Don't complain if we abort or throw. */
&& !current_function_returns_abnormally
- && !DECL_NAME (DECL_RESULT (fndecl))
+ && !DECL_NAME (DECL_RESULT (fndecl)))
+#if 0
+ /* Enable this for all functions until bug 14107 is fixed properly. */
/* Normally, with -Wreturn-type, flow will complain. Unless we're an
inline function, as we might never be compiled separately. */
&& (DECL_INLINE (fndecl) || processing_template_decl))
+#endif
warning ("no return statement in function returning non-void");
/* Store the end of the function, so that we get good line number
bar2 wa [5];
wa[0] = baz(f);
undef2 (1); // { dg-error "" } implicit declaration
-}
+} // { dg-warning "" } no return
int ninny ()
{
int darg (char X::*p)
{
undef3 (1); // { dg-error "" } implicit declaration
-}
+} // { dg-warning "" } no return