===================================================================
@@ -1,3 +1,11 @@
+2013-12-20 Sylvestre Ledru <sylvestre@debian.org>
+
+ PR target/55189
+ * -Wreturn-type enabled by default.
+ * Introduce back the option -Wmissing-return (enabled by -Wall)
+ It was included by default with -Wreturn-type
+ * Update all tests failing because of these changes.
+
2013-12-20 Eric Botcazou <ebotcazou@adacore.com>
* config/arm/arm.c (arm_expand_prologue): In a nested APCS frame with
===================================================================
@@ -673,9 +673,13 @@
Warn about returning a pointer/reference to a local or temporary variable.
Wreturn-type
-C ObjC C++ ObjC++ Var(warn_return_type) Warning LangEnabledBy(C ObjC
C++ ObjC++,Wall)
+C ObjC C++ ObjC++ Var(warn_return_type) Init(1) Warning
Warn whenever a function's return type defaults to \"int\" (C), or
about inconsistent return types (C++)
+Wmissing-return
+C ObjC C++ ObjC++ Var(warn_missing_return) Warning LangEnabledBy(C ObjC
C++ ObjC++,Wall)
+Warn whenever control may reach end of non-void function
+
Wselector
ObjC ObjC++ Var(warn_selector) Warning
Warn if a selector has multiple methods
===================================================================
@@ -261,7 +261,7 @@
-Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
-Wpointer-arith -Wno-pointer-to-int-cast @gol
-Wredundant-decls -Wno-return-local-addr @gol
--Wreturn-type -Wsequence-point -Wshadow @gol
+-Wreturn-type -Wmissing-return -Wsequence-point -Wshadow @gol
-Wsign-compare -Wsign-conversion -Wfloat-conversion @gol
-Wsizeof-pointer-memaccess @gol
-Wstack-protector -Wstack-usage=@var{len} -Wstrict-aliasing @gol
@@ -3339,6 +3339,7 @@
-Wpointer-sign @gol
-Wreorder @gol
-Wreturn-type @gol
+-Wmissing-return @gol
-Wsequence-point @gol
-Wsign-compare @r{(only in C++)} @gol
-Wstrict-aliasing @gol
@@ -3795,8 +3796,14 @@
message, even when @option{-Wno-return-type} is specified. The only
exceptions are @samp{main} and functions defined in system headers.
-This warning is enabled by @option{-Wall}.
+@item -Wmissing-return
+@opindex Wmissing-return
+@opindex Wno-missing-return
+Warn whenever falling off the end of the function body (I.e. without
+any return).
+This warning is enabled by @option{-Wall} for C and C++.
+
@item -Wswitch
@opindex Wswitch
@opindex Wno-switch
===================================================================
@@ -717,6 +717,10 @@
warn_return_type = value;
break;
+ case OPT_Wmissing_return:
+ warn_missing_return = value;
+ break;
+
case OPT_Wsurprising:
gfc_option.warn_surprising = value;
break;
===================================================================
@@ -8098,7 +8098,7 @@
/* If we see "return;" in some basic block, then we do reach the end
without returning a value. */
- else if (warn_return_type
+ else if (warn_missing_return
&& !TREE_NO_WARNING (cfun->decl)
&& EDGE_COUNT (EXIT_BLOCK_PTR_FOR_FN (cfun)->preds) > 0
&& !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (cfun->decl))))
@@ -8113,7 +8113,7 @@