changeset 21024:6176560b03d9

maint: Remove return stmts after gripe function calls. * gripes.h: Mark gripe functions which call error() wwith GCC_ATTR_NORETURN. * jit-typeinfo.cc (gripe_bad_result): Mark function with GCC_ATTR_NORETURN. * load-save.cc (gripe_file_open): Mark function with GCC_ATTR_NORETURN. * ov-base.cc (gripe_indexed_assignment, gripe_assign_conversion_failed, gripe_no_conversion): Mark functions with GCC_ATTR_NORETURN. * ov-class.cc (gripe_invalid_index1, gripe_invalid_index_for_assignment, gripe_invalid_index_type): Mark functions with GCC_ATTR_NORETURN. * ov-classdef.h (gripe_invalid_object): Mark function with GCC_ATTR_NORETURN. * ov.cc (gripe_cat_op, gripe_cat_op_conv): Mark functions with GCC_ATTR_NORETURN. * balance.cc, det.cc, eig.cc, hess.cc, inv.cc, jit-typeinfo.cc, load-save.cc, qz.cc, schur.cc, sparse-xdiv.cc, sparse-xpow.cc, sylvester.cc, xdiv.cc, xpow.cc, symrcm.cc, ov-base.cc, ov-classdef.h, ov-cs-list.cc, ov-flt-re-mat.cc, ov-re-mat.cc, ov-re-sparse.cc, ov.cc, op-int.h, op-fs-fs.cc, ops.h: Remove statements that occur after a gripe function which does not return. * op-cs-cs.cc, op-dms-template.cc, op-fcs-fcs.cc, op-s-s.cc : Add newline between gripe and return statement for readability.
author Rik <rik@octave.org>
date Fri, 01 Jan 2016 13:58:45 -0800
parents ec532a439c6f
children f7e64e1baa08
files libinterp/corefcn/balance.cc libinterp/corefcn/det.cc libinterp/corefcn/eig.cc libinterp/corefcn/gripes.h libinterp/corefcn/hess.cc libinterp/corefcn/inv.cc libinterp/corefcn/jit-typeinfo.cc libinterp/corefcn/load-save.cc libinterp/corefcn/qz.cc libinterp/corefcn/schur.cc libinterp/corefcn/sparse-xdiv.cc libinterp/corefcn/sparse-xpow.cc libinterp/corefcn/sylvester.cc libinterp/corefcn/xdiv.cc libinterp/corefcn/xpow.cc libinterp/dldfcn/symrcm.cc libinterp/octave-value/ov-base.cc libinterp/octave-value/ov-class.cc libinterp/octave-value/ov-classdef.h libinterp/octave-value/ov-cs-list.cc libinterp/octave-value/ov-flt-re-mat.cc libinterp/octave-value/ov-re-mat.cc libinterp/octave-value/ov-re-sparse.cc libinterp/octave-value/ov.cc libinterp/operators/op-cs-cs.cc libinterp/operators/op-dms-template.cc libinterp/operators/op-fcs-fcs.cc libinterp/operators/op-fs-fs.cc libinterp/operators/op-int.h libinterp/operators/op-s-s.cc libinterp/operators/ops.h
diffstat 31 files changed, 146 insertions(+), 328 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/balance.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/corefcn/balance.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -105,10 +105,7 @@
   octave_idx_type nn = args(0).rows ();
 
   if (nn != args(0).columns ())
-    {
-      gripe_square_matrix_required ("balance");
-      return retval;
-    }
+    gripe_square_matrix_required ("balance");
 
   bool isfloat = args(0).is_single_type ()
                  || (! AEPcase && args(1).is_single_type ());
@@ -227,10 +224,7 @@
         bal_job = args(2).xstring_value ("balance: OPT argument must be a string");
 
       if ((nn != args(1).columns ()) || (nn != args(1).rows ()))
-        {
-          gripe_nonconformant ();
-          return retval;
-        }
+        gripe_nonconformant ();
 
       Matrix bb;
       ComplexMatrix cbb;
--- a/libinterp/corefcn/det.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/corefcn/det.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -82,10 +82,7 @@
     return octave_value (1.0);
 
   if (nr != nc)
-    {
-      gripe_square_matrix_required ("det");
-      return ovl ();
-    }
+    gripe_square_matrix_required ("det");
 
   octave_value_list retval (2);
 
--- a/libinterp/corefcn/eig.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/corefcn/eig.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -98,16 +98,10 @@
     }
 
   if (nr_a != nc_a)
-    {
-      gripe_square_matrix_required ("eig");
-      return retval;
-    }
+    gripe_square_matrix_required ("eig");
 
   if (nargin == 2 && nr_b != nc_b)
-    {
-      gripe_square_matrix_required ("eig");
-      return retval;
-    }
+    gripe_square_matrix_required ("eig");
 
   Matrix tmp_a, tmp_b;
   ComplexMatrix ctmp_a, ctmp_b;
--- a/libinterp/corefcn/gripes.h	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/corefcn/gripes.h	Fri Jan 01 13:58:45 2016 -0800
@@ -30,59 +30,57 @@
 class octave_value;
 class octave_execution_exception;
 
-extern OCTINTERP_API void
-gripe_not_supported (const char *) GCC_ATTR_NORETURN;
+extern OCTINTERP_API void GCC_ATTR_NORETURN
+gripe_not_supported (const char *);
 
-extern OCTINTERP_API void
-gripe_not_implemented (const char *) GCC_ATTR_NORETURN;
+extern OCTINTERP_API void GCC_ATTR_NORETURN
+gripe_not_implemented (const char *);
 
-extern OCTINTERP_API void
-gripe_string_invalid (void) GCC_ATTR_NORETURN;
+extern OCTINTERP_API void GCC_ATTR_NORETURN
+gripe_string_invalid (void);
 
-extern OCTINTERP_API void
-gripe_range_invalid (void) GCC_ATTR_NORETURN;
+extern OCTINTERP_API void GCC_ATTR_NORETURN
+gripe_range_invalid (void);
 
-extern OCTINTERP_API void
-gripe_nonconformant (void) GCC_ATTR_NORETURN;
+extern OCTINTERP_API void GCC_ATTR_NORETURN
+gripe_nonconformant (void);
 
-extern OCTINTERP_API void
+extern OCTINTERP_API void GCC_ATTR_NORETURN
 gripe_nonconformant (octave_idx_type r1, octave_idx_type c1,
-                     octave_idx_type r2, octave_idx_type c2) GCC_ATTR_NORETURN;
+                     octave_idx_type r2, octave_idx_type c2);
 
 extern OCTINTERP_API void
 gripe_empty_arg (const char *name, bool is_error);
 
-extern OCTINTERP_API void
-gripe_square_matrix_required (const char *name) GCC_ATTR_NORETURN;
-
-extern OCTINTERP_API void
-gripe_user_supplied_eval (const char *name) GCC_ATTR_NORETURN;
+extern OCTINTERP_API void GCC_ATTR_NORETURN
+gripe_square_matrix_required (const char *name);
 
-extern OCTINTERP_API void
-gripe_user_supplied_eval (octave_execution_exception& e,
-                          const char *name) GCC_ATTR_NORETURN;
+extern OCTINTERP_API void GCC_ATTR_NORETURN
+gripe_user_supplied_eval (const char *name);
 
-extern OCTINTERP_API void
+extern OCTINTERP_API void GCC_ATTR_NORETURN
+gripe_user_supplied_eval (octave_execution_exception& e, const char *name);
+
+extern OCTINTERP_API void GCC_ATTR_NORETURN
 gripe_user_returned_invalid (const char *name);
 
-extern OCTINTERP_API void
-gripe_invalid_conversion (const std::string& from,
-                          const std::string& to) GCC_ATTR_NORETURN;
+extern OCTINTERP_API void GCC_ATTR_NORETURN
+gripe_invalid_conversion (const std::string& from, const std::string& to);
 
 extern OCTINTERP_API void
 gripe_invalid_value_specified (const char *name);
 
-extern OCTINTERP_API void
-gripe_2_or_3_dim_plot (void) GCC_ATTR_NORETURN;
+extern OCTINTERP_API void GCC_ATTR_NORETURN
+gripe_2_or_3_dim_plot (void);
 
-extern OCTINTERP_API void
-gripe_unrecognized_float_fmt (void) GCC_ATTR_NORETURN;
+extern OCTINTERP_API void GCC_ATTR_NORETURN
+gripe_unrecognized_float_fmt (void);
 
-extern OCTINTERP_API void
-gripe_unrecognized_data_fmt (const char *warn_for) GCC_ATTR_NORETURN;
+extern OCTINTERP_API void GCC_ATTR_NORETURN
+gripe_unrecognized_data_fmt (const char *warn_for);
 
-extern OCTINTERP_API void
-gripe_data_conversion (const char *from, const char *to) GCC_ATTR_NORETURN;
+extern OCTINTERP_API void GCC_ATTR_NORETURN
+gripe_data_conversion (const char *from, const char *to);
 
 extern OCTINTERP_API void
 gripe_wrong_type_arg (const char *name, const char *s,
@@ -121,31 +119,37 @@
                       bool is_error = true);
 
 extern OCTINTERP_API void
-gripe_wrong_type_arg (const char *s, bool is_error = true);
+gripe_wrong_type_arg (const char *s,
+                      bool is_error = true);
 
 extern OCTINTERP_API void
 gripe_wrong_type_arg (octave_execution_exception& e,
-                      const char *s, bool is_error = true);
+                      const char *s,
+                      bool is_error = true);
 
 extern OCTINTERP_API void
-gripe_wrong_type_arg (const std::string& s, bool is_error = true);
+gripe_wrong_type_arg (const std::string& s,
+                      bool is_error = true);
 
 extern OCTINTERP_API void
 gripe_wrong_type_arg (octave_execution_exception& e,
-                      const std::string& s, bool is_error = true);
+                      const std::string& s,
+                      bool is_error = true);
 
 extern OCTINTERP_API void
-gripe_wrong_type_arg (const octave_value& tc, bool is_error = true);
+gripe_wrong_type_arg (const octave_value& tc,
+                      bool is_error = true);
 
 extern OCTINTERP_API void
 gripe_wrong_type_arg (octave_execution_exception& e,
-                      const octave_value& tc, bool is_error = true);
+                      const octave_value& tc,
+                      bool is_error = true);
 
-extern OCTINTERP_API void
-gripe_wrong_type_arg_for_unary_op (const octave_value& op) GCC_ATTR_NORETURN;
+extern OCTINTERP_API void GCC_ATTR_NORETURN
+gripe_wrong_type_arg_for_unary_op (const octave_value& op);
 
-extern OCTINTERP_API void
-gripe_wrong_type_arg_for_binary_op (const octave_value& op) GCC_ATTR_NORETURN;
+extern OCTINTERP_API void GCC_ATTR_NORETURN
+gripe_wrong_type_arg_for_binary_op (const octave_value& op);
 
 extern OCTINTERP_API void
 gripe_implicit_conversion (const char *id, const char *from, const char *to);
@@ -160,21 +164,21 @@
 extern OCTINTERP_API void
 gripe_logical_conversion (void);
 
-extern OCTINTERP_API void
-gripe_invalid_inquiry_subscript (void) GCC_ATTR_NORETURN;
+extern OCTINTERP_API void GCC_ATTR_NORETURN
+gripe_invalid_inquiry_subscript (void);
 
-extern OCTINTERP_API void
-gripe_indexed_cs_list (void) GCC_ATTR_NORETURN;
+extern OCTINTERP_API void GCC_ATTR_NORETURN
+gripe_indexed_cs_list (void);
 
-extern OCTINTERP_API void
-gripe_nonbraced_cs_list_assignment (void) GCC_ATTR_NORETURN;
+extern OCTINTERP_API void GCC_ATTR_NORETURN
+gripe_nonbraced_cs_list_assignment (void);
 
 extern OCTINTERP_API void
 gripe_warn_complex_cmp (void);
 
-extern OCTINTERP_API void
+extern OCTINTERP_API void GCC_ATTR_NORETURN
 gripe_disabled_feature (const std::string& func, const std::string& feature,
-                        const std::string& pkg="Octave") GCC_ATTR_NORETURN;
+                        const std::string& pkg="Octave");
 
 extern OCTINTERP_API void
 gripe_data_file_in_path (const std::string& fcn, const std::string& file);
--- a/libinterp/corefcn/hess.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/corefcn/hess.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -80,10 +80,7 @@
     return octave_value_list (2, Matrix ());
 
   if (nr != nc)
-    {
-      gripe_square_matrix_required ("hess");
-      return ovl ();
-    }
+    gripe_square_matrix_required ("hess");
 
   octave_value_list retval;
 
--- a/libinterp/corefcn/inv.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/corefcn/inv.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -74,10 +74,7 @@
     return octave_value (Matrix ());
 
   if (nr != nc)
-    {
-      gripe_square_matrix_required ("inverse");
-      return ovl ();
-    }
+    gripe_square_matrix_required ("inverse");
 
   octave_value result;
   octave_idx_type info;
--- a/libinterp/corefcn/jit-typeinfo.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/corefcn/jit-typeinfo.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -439,7 +439,7 @@
   std::cout << *m << std::endl;
 }
 
-static void
+static void GCC_ATTR_NORETURN
 gripe_bad_result (void)
 {
   error ("incorrect type information given to the JIT compiler");
@@ -460,10 +460,7 @@
   if (result_type)
     {
       if (ovl.length () < 1)
-        {
-          gripe_bad_result ();
-          return 0;
-        }
+        gripe_bad_result ();
 
       octave_value result = ovl.xelem(0);
       octave_base_value *ret = result.internal_rep ();
--- a/libinterp/corefcn/load-save.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/corefcn/load-save.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -126,7 +126,7 @@
 // no newline characters.
 static std::string Vsave_header_format_string = default_save_header_format ();
 
-static void
+static void GCC_ATTR_NORETURN
 gripe_file_open (const std::string& fcn, const std::string& file)
 {
   if (fcn == "load")
@@ -1673,10 +1673,7 @@
               hdf5_file.close ();
             }
           else
-            {
-              gripe_file_open ("save", fname);
-              return retval;
-            }
+            gripe_file_open ("save", fname);
         }
       else
 #endif
@@ -1698,10 +1695,7 @@
                   file.close ();
                 }
               else
-                {
-                  gripe_file_open ("save", fname);
-                  return retval;
-                }
+                gripe_file_open ("save", fname);
             }
           else
 #endif
@@ -1718,10 +1712,7 @@
                   file.close ();
                 }
               else
-                {
-                  gripe_file_open ("save", fname);
-                  return retval;
-                }
+                gripe_file_open ("save", fname);
             }
         }
     }
--- a/libinterp/corefcn/qz.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/corefcn/qz.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -469,10 +469,7 @@
       return octave_value_list (2, Matrix ());
     }
   else if (args(0).columns () != nn)
-    {
-      gripe_square_matrix_required ("qz");
-      return retval;
-    }
+    gripe_square_matrix_required ("qz");
 
   // Argument 1: dimensions look good; get the value.
   Matrix aa;
@@ -489,10 +486,7 @@
 
   // Extract argument 2 (bb, or cbb if complex).
   if ((nn != args(1).columns ()) || (nn != args(1).rows ()))
-    {
-      gripe_nonconformant ();
-      return retval;
-    }
+    gripe_nonconformant ();
 
   Matrix bb;
   ComplexMatrix cbb;
--- a/libinterp/corefcn/schur.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/corefcn/schur.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -167,10 +167,7 @@
   octave_idx_type nc = arg.columns ();
 
   if (nr != nc)
-    {
-      gripe_square_matrix_required ("schur");
-      return ovl ();
-    }
+    gripe_square_matrix_required ("schur");
 
   octave_value_list retval;
 
--- a/libinterp/corefcn/sparse-xdiv.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/corefcn/sparse-xdiv.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -60,7 +60,6 @@
       octave_idx_type b_nc = b.cols ();
 
       gripe_nonconformant ("operator \\", a_nr, a_nc, b_nr, b_nc);
-      return false;
     }
 
   return true;
@@ -95,7 +94,6 @@
       octave_idx_type b_nr = b.rows ();
 
       gripe_nonconformant ("operator /", a_nr, a_nc, b_nr, b_nc);
-      return false;
     }
 
   return true;
--- a/libinterp/corefcn/sparse-xpow.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/corefcn/sparse-xpow.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -419,10 +419,7 @@
     return scalar_xpow (a(0), b);
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   int convert_to_complex = 0;
   for (octave_idx_type j = 0; j < nc; j++)
@@ -524,10 +521,7 @@
     return scalar_xpow (a(0), b);
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   SparseComplexMatrix result (nr, nc, Complex (1.0, 0.0));
   for (octave_idx_type j = 0; j < nc; j++)
@@ -667,10 +661,7 @@
     return scalar_xpow (a(0), b);
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   SparseComplexMatrix result (nr, nc, Complex (1.0, 0.0));
   for (octave_idx_type j = 0; j < nc; j++)
@@ -738,10 +729,7 @@
     return scalar_xpow (a(0), b);
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   SparseComplexMatrix result (nr, nc, Complex (1.0, 0.0));
   for (octave_idx_type j = 0; j < nc; j++)
--- a/libinterp/corefcn/sylvester.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/corefcn/sylvester.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -97,20 +97,11 @@
   // Arguments are not empty, so check for correct dimensions.
 
   if (a_nr != a_nc)
-    {
-      gripe_square_matrix_required ("sylvester: input A");
-      return retval;
-    }
+    gripe_square_matrix_required ("sylvester: input A");
   else if (b_nr != b_nc)
-    {
-      gripe_square_matrix_required ("sylvester: input B");
-      return retval;
-    }
+    gripe_square_matrix_required ("sylvester: input B");
   else if (a_nr != c_nr || b_nr != c_nc)
-    {
-      gripe_nonconformant ();
-      return retval;
-    }
+    gripe_nonconformant ();
 
   if (isfloat)
     {
--- a/libinterp/corefcn/xdiv.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/corefcn/xdiv.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -76,7 +76,6 @@
       octave_idx_type b_nc = b.cols ();
 
       gripe_nonconformant ("operator \\", a_nr, a_nc, b_nr, b_nc);
-      return false;
     }
 
   return true;
@@ -103,7 +102,6 @@
       octave_idx_type b_nr = b.rows ();
 
       gripe_nonconformant ("operator /", a_nr, a_nc, b_nr, b_nc);
-      return false;
     }
 
   return true;
--- a/libinterp/corefcn/xpow.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/corefcn/xpow.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -813,10 +813,7 @@
   octave_idx_type b_nc = b.cols ();
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   int convert_to_complex = 0;
   for (octave_idx_type j = 0; j < nc; j++)
@@ -896,10 +893,7 @@
   octave_idx_type b_nc = b.cols ();
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   ComplexMatrix result (nr, nc);
 
@@ -1037,10 +1031,7 @@
   octave_idx_type b_nc = b.cols ();
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   ComplexMatrix result (nr, nc);
 
@@ -1088,10 +1079,7 @@
   octave_idx_type b_nc = b.cols ();
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   ComplexMatrix result (nr, nc);
 
@@ -1273,10 +1261,7 @@
             return octave_value (bsxfun_pow (xa, xb));
         }
       else
-        {
-          gripe_nonconformant ("operator .^", a_dims, b_dims);
-          return octave_value ();
-        }
+        gripe_nonconformant ("operator .^", a_dims, b_dims);
     }
 
   int len = a.numel ();
@@ -1355,10 +1340,7 @@
           return bsxfun_pow (a, b);
         }
       else
-        {
-          gripe_nonconformant ("operator .^", a_dims, b_dims);
-          return octave_value ();
-        }
+        gripe_nonconformant ("operator .^", a_dims, b_dims);
     }
 
   ComplexNDArray result (a_dims);
@@ -1454,10 +1436,7 @@
           return bsxfun_pow (a, b);
         }
       else
-        {
-          gripe_nonconformant ("operator .^", a_dims, b_dims);
-          return octave_value ();
-        }
+        gripe_nonconformant ("operator .^", a_dims, b_dims);
     }
 
   ComplexNDArray result (a_dims);
@@ -1504,10 +1483,7 @@
           return bsxfun_pow (a, b);
         }
       else
-        {
-          gripe_nonconformant ("operator .^", a_dims, b_dims);
-          return octave_value ();
-        }
+        gripe_nonconformant ("operator .^", a_dims, b_dims);
     }
 
   ComplexNDArray result (a_dims);
@@ -2219,10 +2195,7 @@
   octave_idx_type b_nc = b.cols ();
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   int convert_to_complex = 0;
   for (octave_idx_type j = 0; j < nc; j++)
@@ -2302,10 +2275,7 @@
   octave_idx_type b_nc = b.cols ();
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   FloatComplexMatrix result (nr, nc);
 
@@ -2403,10 +2373,7 @@
   octave_idx_type b_nc = b.cols ();
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   FloatComplexMatrix result (nr, nc);
 
@@ -2454,10 +2421,7 @@
   octave_idx_type b_nc = b.cols ();
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   FloatComplexMatrix result (nr, nc);
 
@@ -2639,10 +2603,7 @@
             return octave_value (bsxfun_pow (xa, xb));
         }
       else
-        {
-          gripe_nonconformant ("operator .^", a_dims, b_dims);
-          return octave_value ();
-        }
+        gripe_nonconformant ("operator .^", a_dims, b_dims);
     }
 
   int len = a.numel ();
@@ -2721,10 +2682,7 @@
           return bsxfun_pow (a, b);
         }
       else
-        {
-          gripe_nonconformant ("operator .^", a_dims, b_dims);
-          return octave_value ();
-        }
+        gripe_nonconformant ("operator .^", a_dims, b_dims);
     }
 
   FloatComplexNDArray result (a_dims);
@@ -2820,10 +2778,7 @@
           return bsxfun_pow (a, b);
         }
       else
-        {
-          gripe_nonconformant ("operator .^", a_dims, b_dims);
-          return octave_value ();
-        }
+        gripe_nonconformant ("operator .^", a_dims, b_dims);
     }
 
   FloatComplexNDArray result (a_dims);
@@ -2870,10 +2825,7 @@
           return bsxfun_pow (a, b);
         }
       else
-        {
-          gripe_nonconformant ("operator .^", a_dims, b_dims);
-          return octave_value ();
-        }
+        gripe_nonconformant ("operator .^", a_dims, b_dims);
     }
 
   FloatComplexNDArray result (a_dims);
--- a/libinterp/dldfcn/symrcm.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/dldfcn/symrcm.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -469,10 +469,7 @@
   octave_idx_type nc = arg.columns ();
 
   if (nr != nc)
-    {
-      gripe_square_matrix_required ("symrcm");
-      return retval;
-    }
+    gripe_square_matrix_required ("symrcm");
 
   if (nr == 0 && nc == 0)
     return ovl (NDArray (dim_vector (1, 0)));
--- a/libinterp/octave-value/ov-base.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/octave-value/ov-base.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -215,7 +215,6 @@
 {
   std::string nm = "<" + type_name () + ">";
   gripe_invalid_index (nm.c_str ());
-  return idx_vector ();
 }
 
 octave_value
@@ -386,8 +385,7 @@
 octave_base_value::convert_to_row_or_column_vector (void)
 {
   gripe_wrong_type_arg
-    ("octave_base_value::convert_to_row_or_column_vector ()",
-     type_name ());
+    ("octave_base_value::convert_to_row_or_column_vector ()", type_name ());
 }
 
 void
@@ -1299,22 +1297,21 @@
      << " dims: " << dv.str ();
 }
 
-static void
+static void GCC_ATTR_NORETURN
 gripe_indexed_assignment (const std::string& tn1, const std::string& tn2)
 {
   error ("assignment of '%s' to indexed '%s' not implemented",
          tn2.c_str (), tn1.c_str ());
 }
 
-static void
-gripe_assign_conversion_failed (const std::string& tn1,
-                                const std::string& tn2)
+static void GCC_ATTR_NORETURN
+gripe_assign_conversion_failed (const std::string& tn1, const std::string& tn2)
 {
   error ("type conversion for assignment of '%s' to indexed '%s' failed",
          tn2.c_str (), tn1.c_str ());
 }
 
-static void
+static void GCC_ATTR_NORETURN
 gripe_no_conversion (const std::string& on, const std::string& tn1,
                      const std::string& tn2)
 {
@@ -1415,11 +1412,8 @@
               if (tmp)
                 tmp_rhs = octave_value (tmp);
               else
-                {
-                  gripe_assign_conversion_failed (type_name (),
-                                                  rhs.type_name ());
-                  return octave_value ();
-                }
+                gripe_assign_conversion_failed (type_name (),
+                                                rhs.type_name ());
             }
           else
             tmp_rhs = rhs;
@@ -1434,11 +1428,8 @@
               if (tmp)
                 tmp_lhs = octave_value (tmp);
               else
-                {
-                  gripe_assign_conversion_failed (type_name (),
-                                                  rhs.type_name ());
-                  return octave_value ();
-                }
+                gripe_assign_conversion_failed (type_name (),
+                                                rhs.type_name ());
             }
 
           if (cf_this || cf_rhs)
@@ -1499,7 +1490,7 @@
   beginning_of_line = true;
 }
 
-// For ressetting print state.
+// For resetting print state.
 
 void
 octave_base_value::reset (void) const
--- a/libinterp/octave-value/ov-class.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/octave-value/ov-class.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -238,19 +238,19 @@
   return retval;
 }
 
-static void
+static void GCC_ATTR_NORETURN
 gripe_invalid_index1 (void)
 {
   error ("invalid index for class");
 }
 
-static void
+static void GCC_ATTR_NORETURN
 gripe_invalid_index_for_assignment (void)
 {
   error ("invalid index for class assignment");
 }
 
-static void
+static void GCC_ATTR_NORETURN 
 gripe_invalid_index_type (const std::string& nm, char t)
 {
   error ("%s cannot be indexed with %c", nm.c_str (), t);
--- a/libinterp/octave-value/ov-classdef.h	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/octave-value/ov-classdef.h	Fri Jan 01 13:58:45 2016 -0800
@@ -62,25 +62,21 @@
   virtual cdef_object_rep* clone (void) const
   {
     gripe_invalid_object ("clone");
-    return new cdef_object_rep ();
   }
 
   virtual cdef_object_rep* empty_clone (void) const
   {
     gripe_invalid_object ("empty_clone");
-    return new cdef_object_rep ();
   }
 
   virtual cdef_object_rep* copy (void) const
   {
     gripe_invalid_object ("copy");
-    return new cdef_object_rep ();
   }
 
   virtual cdef_object_rep* make_array (void) const
   {
     gripe_invalid_object ("make_array");
-    return new cdef_object_rep ();
   }
 
   virtual bool is_array (void) const { return false; }
@@ -94,7 +90,6 @@
   virtual Array<cdef_object> array_value (void) const
   {
     gripe_invalid_object ("array_value");
-    return Array<cdef_object> ();
   }
 
   virtual void put (const std::string&, const octave_value&)
@@ -103,7 +98,6 @@
   virtual octave_value get (const std::string&) const
   {
     gripe_invalid_object ("get");
-    return octave_value ();
   }
 
   virtual octave_value_list
@@ -111,7 +105,6 @@
            int, size_t&, const cdef_class&, bool)
   {
     gripe_invalid_object ("subsref");
-    return ovl ();
   }
 
   virtual octave_value
@@ -119,7 +112,6 @@
             const octave_value&)
   {
     gripe_invalid_object ("subsasgn");
-    return octave_value ();
   }
 
   virtual string_vector map_keys (void) const;
@@ -129,30 +121,33 @@
   std::string class_name (void) const;
 
   virtual void mark_for_construction (const cdef_class&)
-  { gripe_invalid_object ("mark_for_construction"); }
+  {
+    gripe_invalid_object ("mark_for_construction");
+  }
 
   virtual bool is_constructed_for (const cdef_class&) const
   {
     gripe_invalid_object ("is_constructed_for");
-    return false;
   }
 
   virtual bool is_partially_constructed_for (const cdef_class&) const
   {
     gripe_invalid_object ("is_partially_constructed_for");
-    return false;
   }
 
   virtual void mark_as_constructed (void)
-  { gripe_invalid_object ("mark_as_constructed"); }
+  {
+    gripe_invalid_object ("mark_as_constructed");
+  }
 
   virtual void mark_as_constructed (const cdef_class&)
-  { gripe_invalid_object ("mark_as_constructed"); }
+  {
+    gripe_invalid_object ("mark_as_constructed");
+  }
 
   virtual bool is_constructed (void) const
   {
     gripe_invalid_object ("is_constructed");
-    return false;
   }
 
   virtual octave_idx_type static_count (void) const { return 0; }
@@ -180,7 +175,7 @@
   // No assignment
   cdef_object_rep& operator = (const cdef_object_rep& );
 
-  void gripe_invalid_object (const char *who) const
+  void GCC_ATTR_NORETURN gripe_invalid_object (const char *who) const
   { error ("%s: invalid object", who); }
 };
 
@@ -1169,7 +1164,6 @@
 cdef_object_rep::get_class (void) const
 {
   gripe_invalid_object ("get_class");
-  return cdef_class ();
 }
 
 inline std::string
--- a/libinterp/octave-value/ov-cs-list.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/octave-value/ov-cs-list.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -48,7 +48,6 @@
                          const std::list<octave_value_list>&)
 {
   gripe_indexed_cs_list ();
-  return octave_value ();
 }
 
 octave_value_list
@@ -56,6 +55,5 @@
                          const std::list<octave_value_list>&, int)
 {
   gripe_indexed_cs_list ();
-  return ovl ();
 }
 
--- a/libinterp/octave-value/ov-flt-re-mat.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/octave-value/ov-flt-re-mat.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -290,10 +290,7 @@
       float d = matrix (i);
 
       if (xisnan (d))
-        {
-          gripe_nan_to_character_conversion ();
-          return retval;
-        }
+        gripe_nan_to_character_conversion ();
       else
         {
           int ival = NINT (d);
--- a/libinterp/octave-value/ov-re-mat.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/octave-value/ov-re-mat.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -392,10 +392,7 @@
       double d = matrix (i);
 
       if (xisnan (d))
-        {
-          gripe_nan_to_character_conversion ();
-          return retval;
-        }
+        gripe_nan_to_character_conversion ();
       else
         {
           int ival = NINT (d);
--- a/libinterp/octave-value/ov-re-sparse.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/octave-value/ov-re-sparse.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -63,7 +63,6 @@
     {
       std::string nm = "<" + type_name () + ">";
       gripe_invalid_index (nm.c_str ());
-      return idx_vector ();
     }
 }
 
@@ -225,10 +224,7 @@
             double d = matrix.data (i);
 
             if (xisnan (d))
-              {
-                gripe_nan_to_character_conversion ();
-                return retval;
-              }
+              gripe_nan_to_character_conversion ();
             else
               {
                 int ival = NINT (d);
--- a/libinterp/octave-value/ov.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/octave-value/ov.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -2123,10 +2123,7 @@
                   t1 = tv1.type_id ();
                 }
               else
-                {
-                  gripe_binary_op_conv (octave_value::binary_op_as_string (op));
-                  return retval;
-                }
+                gripe_binary_op_conv (octave_value::binary_op_as_string (op));
             }
           else
             tv1 = v1;
@@ -2141,10 +2138,7 @@
                   t2 = tv2.type_id ();
                 }
               else
-                {
-                  gripe_binary_op_conv (octave_value::binary_op_as_string (op));
-                  return retval;
-                }
+                gripe_binary_op_conv (octave_value::binary_op_as_string (op));
             }
           else
             tv2 = v2;
@@ -2181,11 +2175,8 @@
                       t1 = tv1.type_id ();
                     }
                   else
-                    {
-                      gripe_binary_op_conv
-                        (octave_value::binary_op_as_string (op));
-                      return retval;
-                    }
+                    gripe_binary_op_conv
+                      (octave_value::binary_op_as_string (op));
                 }
 
               if (cf2)
@@ -2198,11 +2189,8 @@
                       t2 = tv2.type_id ();
                     }
                   else
-                    {
-                      gripe_binary_op_conv
-                        (octave_value::binary_op_as_string (op));
-                      return retval;
-                    }
+                    gripe_binary_op_conv
+                      (octave_value::binary_op_as_string (op));
                 }
 
               if (cf1 || cf2)
@@ -2327,14 +2315,14 @@
   return retval;
 }
 
-static void
+static void GCC_ATTR_NORETURN
 gripe_cat_op (const std::string& tn1, const std::string& tn2)
 {
   error ("concatenation operator not implemented for '%s' by '%s' operations",
          tn1.c_str (), tn2.c_str ());
 }
 
-static void
+static void GCC_ATTR_NORETURN
 gripe_cat_op_conv (void)
 {
   error ("type conversion failed for concatenation operator");
@@ -2383,10 +2371,7 @@
               t1 = tv1.type_id ();
             }
           else
-            {
-              gripe_cat_op_conv ();
-              return retval;
-            }
+            gripe_cat_op_conv ();
         }
       else
         tv1 = v1;
@@ -2401,10 +2386,7 @@
               t2 = tv2.type_id ();
             }
           else
-            {
-              gripe_cat_op_conv ();
-              return retval;
-            }
+            gripe_cat_op_conv ();
         }
       else
         tv2 = v2;
--- a/libinterp/operators/op-cs-cs.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/operators/op-cs-cs.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -46,6 +46,7 @@
   Complex x = v.complex_value ();
   if (xisnan (x))
     gripe_nan_to_logical_conversion ();
+
   return octave_value (x == 0.0);
 }
 
--- a/libinterp/operators/op-dms-template.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/operators/op-dms-template.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -54,6 +54,7 @@
 {
   if (x == T ())
     gripe_divide_by_zero ();
+
   return x;
 }
 
--- a/libinterp/operators/op-fcs-fcs.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/operators/op-fcs-fcs.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -44,6 +44,7 @@
   FloatComplex x = v.float_complex_value ();
   if (xisnan (x))
     gripe_nan_to_logical_conversion ();
+
   return octave_value (x == 0.0f);
 }
 
--- a/libinterp/operators/op-fs-fs.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/operators/op-fs-fs.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -46,6 +46,7 @@
   float x = v.float_value ();
   if (xisnan (x))
     gripe_nan_to_logical_conversion ();
+
   return octave_value (x == 0.0f);
 }
 
--- a/libinterp/operators/op-int.h	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/operators/op-int.h	Fri Jan 01 13:58:45 2016 -0800
@@ -701,14 +701,9 @@
     if (a_dims != b_dims) \
       { \
         if (is_valid_bsxfun ("operator .^", a_dims, b_dims))     \
-          { \
-            return bsxfun_pow (a, b); \
-          } \
+          return bsxfun_pow (a, b); \
         else \
-          { \
-            gripe_nonconformant ("operator .^", a_dims, b_dims);  \
-            return octave_value (); \
-          } \
+          gripe_nonconformant ("operator .^", a_dims, b_dims);  \
       } \
     T1 ## NDArray result (a_dims); \
     for (int i = 0; i < a.numel (); i++) \
@@ -727,14 +722,9 @@
     if (a_dims != b_dims) \
       { \
         if (is_valid_bsxfun ("operator .^", a_dims, b_dims))     \
-          { \
-            return bsxfun_pow (a, b); \
-          } \
+          return bsxfun_pow (a, b); \
         else \
-          { \
-            gripe_nonconformant ("operator .^", a_dims, b_dims);  \
-            return octave_value (); \
-          } \
+          gripe_nonconformant ("operator .^", a_dims, b_dims);  \
       } \
     T1 ## NDArray result (a_dims); \
     for (int i = 0; i < a.numel (); i++) \
@@ -753,14 +743,9 @@
     if (a_dims != b_dims) \
       { \
         if (is_valid_bsxfun ("operator .^", a_dims, b_dims))     \
-          { \
-            return bsxfun_pow (a, b); \
-          } \
+          return bsxfun_pow (a, b); \
         else \
-          { \
-            gripe_nonconformant ("operator .^", a_dims, b_dims);  \
-            return octave_value (); \
-          } \
+          gripe_nonconformant ("operator .^", a_dims, b_dims);  \
       } \
     T2 ## NDArray result (a_dims); \
     for (int i = 0; i < a.numel (); i++) \
@@ -779,14 +764,9 @@
     if (a_dims != b_dims) \
       { \
         if (is_valid_bsxfun ("operator .^", a_dims, b_dims))     \
-          { \
-            return bsxfun_pow (a, b); \
-          } \
+          return bsxfun_pow (a, b); \
         else \
-          { \
-            gripe_nonconformant ("operator .^", a_dims, b_dims);  \
-            return octave_value (); \
-          } \
+          gripe_nonconformant ("operator .^", a_dims, b_dims);  \
       } \
     T1 ## NDArray result (a_dims); \
     for (int i = 0; i < a.numel (); i++) \
@@ -805,14 +785,9 @@
     if (a_dims != b_dims) \
       { \
         if (is_valid_bsxfun ("operator .^", a_dims, b_dims))     \
-          { \
-            return bsxfun_pow (a, b); \
-          } \
+          return bsxfun_pow (a, b); \
         else \
-          { \
-            gripe_nonconformant ("operator .^", a_dims, b_dims);  \
-            return octave_value (); \
-          } \
+          gripe_nonconformant ("operator .^", a_dims, b_dims);  \
       } \
     T2 ## NDArray result (a_dims); \
     for (int i = 0; i < a.numel (); i++) \
--- a/libinterp/operators/op-s-s.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/operators/op-s-s.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -47,6 +47,7 @@
   double x = v.scalar_value ();
   if (xisnan (x))
     gripe_nan_to_logical_conversion ();
+
   return octave_value (x == 0.0);
 }
 
--- a/libinterp/operators/ops.h	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/operators/ops.h	Fri Jan 01 13:58:45 2016 -0800
@@ -301,10 +301,7 @@
   { \
     CAST_BINOP_ARGS (const CONCAT2(octave_, t1)&, const CONCAT2(octave_, t2)&); \
     if (xisnan (v1.CONCAT2(t1, _value) ()) || xisnan (v2.CONCAT2(t2, _value) ())) \
-      { \
-        gripe_nan_to_logical_conversion (); \
-        return octave_value (); \
-      } \
+      gripe_nan_to_logical_conversion (); \
     else \
       return octave_value \
         (v1.CONCAT2(t1, _value) () op v2.CONCAT2(t2, _value) ()); \