changeset 23450:855122b993da

maint: Wrap tertiary operator in parentheses "(COND ? x : y)". * Canvas.cc, color-picker.cc, dialog.cc, marker.cc, main-window.cc, Cell.cc, __magick_read__.cc, __pchip_deriv__.cc, __qp__.cc, bsxfun.cc, call-stack.cc, cellfun.cc, data.cc, defaults.cc, det.cc, eig.cc, error.cc, file-io.cc, filter.cc, find.cc, gammainc.cc, gcd.cc, gl-render.cc, graphics.cc, graphics.in.h, help.cc, hex2num.cc, inv.cc, load-save.cc, lookup.cc, ls-mat4.cc, ls-mat5.cc, ls-oct-binary.cc, ls-oct-text.cc, lu.cc, max.cc, mex.cc, oct-hist.cc, oct-map.cc, oct-procbuf.cc, oct-stream.cc, pr-output.cc, rand.cc, regexp.cc, schur.cc, str2double.cc, strfns.cc, symtab.cc, sysdep.cc, tril.cc, variables.cc, xdiv.cc, audiodevinfo.cc, audioread.cc, colamd.cc, gzip.cc, ov-base-diag.cc, ov-base-mat.h, ov-base-scalar.h, ov-class.cc, ov-classdef.cc, ov-fcn-handle.cc, ov-range.cc, ov-range.h, ov-struct.cc, ov-usr-fcn.cc, ov.cc, octave.cc, op-class.cc, pt-eval.cc, pt-funcall.cc, pt-idx.cc, pt-jit.cc, pt-stmt.cc, version.cc, Array-util.cc, Array.cc, CDiagMatrix.cc, CMatrix.cc, CNDArray.cc, CSparse.cc, Range.cc, Sparse.cc, chNDArray.cc, dDiagMatrix.cc, dMatrix.cc, dNDArray.cc, dSparse.cc, dim-vector.cc, fCDiagMatrix.cc, fCMatrix.cc, fCNDArray.cc, fDiagMatrix.cc, fMatrix.cc, fNDArray.cc, idx-vector.cc, idx-vector.h, Faddeeva.cc, DASPK.cc, DASRT.cc, DASSL.cc, EIG.cc, fEIG.cc, gsvd.cc, lo-specfun.cc, oct-rand.cc, qr.cc, qrp.cc, randgamma.cc, schur.cc, svd.cc, Sparse-diag-op-defs.h, mx-inlines.cc, oct-env.cc, cmd-edit.cc, kpse.cc, oct-inttypes.h, oct-sort.cc: Wrap tertiary operator in parentheses "(COND ? x : y)".
author Rik <rik@octave.org>
date Thu, 27 Apr 2017 17:33:10 -0700
parents c763214a8260
children e4fca7cc471c
files libgui/graphics/Canvas.cc libgui/src/color-picker.cc libgui/src/dialog.cc libgui/src/m-editor/marker.cc libgui/src/main-window.cc libinterp/corefcn/Cell.cc libinterp/corefcn/__magick_read__.cc libinterp/corefcn/__pchip_deriv__.cc libinterp/corefcn/__qp__.cc libinterp/corefcn/bsxfun.cc libinterp/corefcn/call-stack.cc libinterp/corefcn/cellfun.cc libinterp/corefcn/data.cc libinterp/corefcn/defaults.cc libinterp/corefcn/det.cc libinterp/corefcn/eig.cc libinterp/corefcn/error.cc libinterp/corefcn/file-io.cc libinterp/corefcn/filter.cc libinterp/corefcn/find.cc libinterp/corefcn/gammainc.cc libinterp/corefcn/gcd.cc libinterp/corefcn/gl-render.cc libinterp/corefcn/graphics.cc libinterp/corefcn/graphics.in.h libinterp/corefcn/help.cc libinterp/corefcn/hex2num.cc libinterp/corefcn/inv.cc libinterp/corefcn/load-save.cc libinterp/corefcn/lookup.cc libinterp/corefcn/ls-mat4.cc libinterp/corefcn/ls-mat5.cc libinterp/corefcn/ls-oct-binary.cc libinterp/corefcn/ls-oct-text.cc libinterp/corefcn/lu.cc libinterp/corefcn/max.cc libinterp/corefcn/mex.cc libinterp/corefcn/oct-hist.cc libinterp/corefcn/oct-map.cc libinterp/corefcn/oct-procbuf.cc libinterp/corefcn/oct-stream.cc libinterp/corefcn/pr-output.cc libinterp/corefcn/rand.cc libinterp/corefcn/regexp.cc libinterp/corefcn/schur.cc libinterp/corefcn/str2double.cc libinterp/corefcn/strfns.cc libinterp/corefcn/symtab.cc libinterp/corefcn/sysdep.cc libinterp/corefcn/tril.cc libinterp/corefcn/variables.cc libinterp/corefcn/xdiv.cc libinterp/dldfcn/audiodevinfo.cc libinterp/dldfcn/audioread.cc libinterp/dldfcn/colamd.cc libinterp/dldfcn/gzip.cc libinterp/octave-value/ov-base-diag.cc libinterp/octave-value/ov-base-mat.h libinterp/octave-value/ov-base-scalar.h libinterp/octave-value/ov-class.cc libinterp/octave-value/ov-classdef.cc libinterp/octave-value/ov-fcn-handle.cc libinterp/octave-value/ov-range.cc libinterp/octave-value/ov-range.h libinterp/octave-value/ov-struct.cc libinterp/octave-value/ov-usr-fcn.cc libinterp/octave-value/ov.cc libinterp/octave.cc libinterp/operators/op-class.cc libinterp/parse-tree/pt-eval.cc libinterp/parse-tree/pt-funcall.cc libinterp/parse-tree/pt-idx.cc libinterp/parse-tree/pt-jit.cc libinterp/parse-tree/pt-stmt.cc libinterp/version.cc liboctave/array/Array-util.cc liboctave/array/Array.cc liboctave/array/CDiagMatrix.cc liboctave/array/CMatrix.cc liboctave/array/CNDArray.cc liboctave/array/CSparse.cc liboctave/array/Range.cc liboctave/array/Sparse.cc liboctave/array/chNDArray.cc liboctave/array/dDiagMatrix.cc liboctave/array/dMatrix.cc liboctave/array/dNDArray.cc liboctave/array/dSparse.cc liboctave/array/dim-vector.cc liboctave/array/fCDiagMatrix.cc liboctave/array/fCMatrix.cc liboctave/array/fCNDArray.cc liboctave/array/fDiagMatrix.cc liboctave/array/fMatrix.cc liboctave/array/fNDArray.cc liboctave/array/idx-vector.cc liboctave/array/idx-vector.h liboctave/external/Faddeeva/Faddeeva.cc liboctave/numeric/DASPK.cc liboctave/numeric/DASRT.cc liboctave/numeric/DASSL.cc liboctave/numeric/EIG.cc liboctave/numeric/fEIG.cc liboctave/numeric/gsvd.cc liboctave/numeric/lo-specfun.cc liboctave/numeric/oct-rand.cc liboctave/numeric/qr.cc liboctave/numeric/qrp.cc liboctave/numeric/randgamma.cc liboctave/numeric/schur.cc liboctave/numeric/svd.cc liboctave/operators/Sparse-diag-op-defs.h liboctave/operators/mx-inlines.cc liboctave/system/oct-env.cc liboctave/util/cmd-edit.cc liboctave/util/kpse.cc liboctave/util/oct-inttypes.h liboctave/util/oct-sort.cc
diffstat 118 files changed, 534 insertions(+), 523 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/graphics/Canvas.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libgui/graphics/Canvas.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -814,7 +814,7 @@
 
             if (m_mouseAnchor == event->pos ())
               {
-                double factor = m_clickMode ? 2.0 : 0.5;
+                double factor = (m_clickMode ? 2.0 : 0.5);
 
                 ColumnVector p1 = ap.pixel2coord (event->x (), event->y ());
 
@@ -983,7 +983,7 @@
                 {
                   axes::properties& ap = Utils::properties<axes> (axesObj);
 
-                  double factor = event->delta () > 0 ? 0.1 : -0.1;
+                  double factor = (event->delta () > 0 ? 0.1 : -0.1);
 
                   ap.pan (mode, factor);
                 }
--- a/libgui/src/color-picker.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libgui/src/color-picker.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -61,7 +61,7 @@
   QWidget *p = parentWidget ();
 
   QString bordercolor
-    = p ? p->palette ().text ().color ().name () : QString ("#000000");
+    = (p ? p->palette ().text ().color ().name () : QString ("#000000"));
 
   QString css = QString ("background-color: %1; border: 1px solid %2;")
                 .arg (_color.name ())
--- a/libgui/src/dialog.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libgui/src/dialog.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -152,7 +152,7 @@
     eicon = QMessageBox::Question;
   setIcon (eicon);
 
-  int N = qsbutton.size () < role.size () ? qsbutton.size () : role.size ();
+  int N = (qsbutton.size () < role.size () ? qsbutton.size () : role.size ());
   if (N == 0)
     addButton (QMessageBox::Ok);
   else
--- a/libgui/src/m-editor/marker.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libgui/src/m-editor/marker.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -152,8 +152,9 @@
         {
           int editor_linenr = _edit_area->markerLine (_mhandle);
           _edit_area->markerDeleteHandle (_mhandle);
-          _marker_type = _marker_type == breakpoint ? unsure_breakpoint
-                                                    : unsure_debugger_position;
+          _marker_type = (_marker_type == breakpoint
+                          ? unsure_breakpoint
+                          : unsure_debugger_position);
           _mhandle = _edit_area->markerAdd (editor_linenr, _marker_type);
         }
     }
@@ -175,8 +176,9 @@
         {
           int editor_linenr = _edit_area->markerLine (_mhandle);
           _edit_area->markerDeleteHandle (_mhandle);
-          _marker_type = _marker_type == unsure_breakpoint ? breakpoint
-                                                           : debugger_position;
+          _marker_type = (_marker_type == unsure_breakpoint
+                          ? breakpoint
+                          : debugger_position);
           _mhandle = _edit_area->markerAdd (editor_linenr, _marker_type);
         }
     }
--- a/libgui/src/main-window.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libgui/src/main-window.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -952,7 +952,7 @@
 {
   // Change to dir if it is an existing directory.
 
-  QString xdir = dir.isEmpty () ? "." : dir;
+  QString xdir = (dir.isEmpty () ? "." : dir);
 
   QFileInfo fileInfo (xdir);
 
--- a/libinterp/corefcn/Cell.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/Cell.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -101,7 +101,7 @@
     {
       octave_idx_type m = numel ();
 
-      octave_idx_type len = n > m ? m : n;
+      octave_idx_type len = (n > m ? m : n);
 
       for (octave_idx_type i = 0; i < len; i++)
         {
--- a/libinterp/corefcn/__magick_read__.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/__magick_read__.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -1001,7 +1001,7 @@
                        const Matrix& cmap)
 {
   typedef typename T::element_type P;
-  const octave_idx_type nFrames   = img.ndims () < 4 ? 1 : img.dims ()(3);
+  const octave_idx_type nFrames   = (img.ndims () < 4 ? 1 : img.dims ()(3));
   const octave_idx_type nRows     = img.rows ();
   const octave_idx_type nCols     = img.columns ();
   const octave_idx_type cmap_size = cmap.rows ();
@@ -1068,7 +1068,7 @@
 static void
 encode_bool_image (std::vector<Magick::Image>& imvec, const boolNDArray& img)
 {
-  const octave_idx_type nFrames = img.ndims () < 4 ? 1 : img.dims ()(3);
+  const octave_idx_type nFrames = (img.ndims () < 4 ? 1 : img.dims ()(3));
   const octave_idx_type nRows   = img.rows ();
   const octave_idx_type nCols   = img.columns ();
 
@@ -1118,8 +1118,8 @@
                    const T& img, const T& alpha)
 {
   typedef typename T::element_type P;
-  const octave_idx_type channels = img.ndims () < 3 ? 1 : img.dims ()(2);
-  const octave_idx_type nFrames  = img.ndims () < 4 ? 1 : img.dims ()(3);
+  const octave_idx_type channels = (img.ndims () < 3 ? 1 : img.dims ()(2));
+  const octave_idx_type nFrames  = (img.ndims () < 4 ? 1 : img.dims ()(3));
   const octave_idx_type nRows    = img.rows ();
   const octave_idx_type nCols    = img.columns ();
   const octave_idx_type bitdepth = bitdepth_from_class<T> ();
--- a/libinterp/corefcn/__pchip_deriv__.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/__pchip_deriv__.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -69,8 +69,8 @@
           FloatMatrix dmat (nyr, nyc);
 
           F77_INT ierr;
-          const F77_INT incfd = rows ? octave::to_f77_int (nyr) : 1;
-          volatile const octave_idx_type inc = rows ? 1 : nyr;
+          const F77_INT incfd = (rows ? octave::to_f77_int (nyr) : 1);
+          volatile const octave_idx_type inc = (rows ? 1 : nyr);
           volatile octave_idx_type k = 0;
 
           for (volatile octave_idx_type i = (rows ? nyr : nyc); i > 0; i--)
@@ -107,8 +107,8 @@
           Matrix dmat (nyr, nyc);
 
           F77_INT ierr;
-          const F77_INT incfd = rows ? octave::to_f77_int (nyr) : 1;
-          volatile const octave_idx_type inc = rows ? 1 : nyr;
+          const F77_INT incfd = (rows ? octave::to_f77_int (nyr) : 1);
+          volatile const octave_idx_type inc = (rows ? 1 : nyr);
           volatile octave_idx_type k = 0;
 
           for (volatile octave_idx_type i = (rows ? nyr : nyc); i > 0; i--)
--- a/libinterp/corefcn/__qp__.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/__qp__.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -58,7 +58,7 @@
       octave_idx_type A_nr = A.rows ();
       octave_idx_type A_nc = A.cols ();
 
-      octave_idx_type tmp = A_nr > A_nc ? A_nr : A_nc;
+      octave_idx_type tmp = (A_nr > A_nc ? A_nr : A_nc);
 
       double tol = tmp * s(0) * std::numeric_limits<double>::epsilon ();
 
--- a/libinterp/corefcn/bsxfun.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/bsxfun.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -396,9 +396,9 @@
 
       for (octave_idx_type i = 0; i < nd; i++)
         dvc(i) = (dva(i) < 1 ? dva(i)
-                  : (dvb(i) < 1 ? dvb(i)
-                     : (dva(i) > dvb(i)
-                        ? dva(i) : dvb(i))));
+                             : (dvb(i) < 1 ? dvb(i)
+                                           : (dva(i) > dvb(i) ? dva(i)
+                                                              : dvb(i))));
 
       if (dva == dvb || dva.numel () == 1 || dvb.numel () == 1)
         {
--- a/libinterp/corefcn/call-stack.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/call-stack.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -373,7 +373,7 @@
 
     size_t user_code_frames = do_num_user_code_frames (curr_user_frame);
 
-    size_t nframes = nskip <= user_code_frames ? user_code_frames - nskip : 0;
+    size_t nframes = (nskip <= user_code_frames ? user_code_frames - nskip : 0);
 
     // Our list is reversed.
     curr_user_frame = nframes - curr_user_frame - 1;
--- a/libinterp/corefcn/cellfun.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/cellfun.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -1850,7 +1850,7 @@
       for (octave_idx_type j = 0; j < d[i].numel (); j++)
         s += d[i](j);
 
-      octave_idx_type r = i < dv.ndims () ? dv(i) : 1;
+      octave_idx_type r = (i < dv.ndims () ? dv(i) : 1);
 
       if (s != r)
         error ("mat2cell: mismatch on dimension %d (%d != %d)", i+1, r, s);
@@ -1864,7 +1864,7 @@
 prepare_idx (container *idx, int idim, int nd,
              const Array<octave_idx_type>* d)
 {
-  octave_idx_type nidx = idim < nd ? d[idim].numel () : 1;
+  octave_idx_type nidx = (idim < nd ? d[idim].numel () : 1);
   if (nidx == 1)
     idx[0] = idx_vector::colon;
   else
@@ -1894,7 +1894,7 @@
     return retval;
 
   octave_idx_type nridx = d[0].numel ();
-  octave_idx_type ncidx = nd == 1 ? 1 : d[1].numel ();
+  octave_idx_type ncidx = (nd == 1 ? 1 : d[1].numel ());
   retval.clear (nridx, ncidx);
 
   int ivec = -1;
--- a/libinterp/corefcn/data.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/data.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -1858,7 +1858,7 @@
         }
       else if (result_type == "char")
         {
-          char type = all_dq_strings_p ? '"' : '\'';
+          char type = (all_dq_strings_p ? '"' : '\'');
 
           if (! all_strings_p)
             warn_implicit_conversion ("Octave:num-to-str",
@@ -6178,8 +6178,8 @@
   if (nargin < 2 || nargin > 3)
     print_usage ();
 
-  return (nargin == 2) ? do_colon_op (args(0), args(1))
-                       : do_colon_op (args(0), args(1), args(2));
+  return (nargin == 2 ? do_colon_op (args(0), args(1))
+                      : do_colon_op (args(0), args(1), args(2)));
 }
 
 static double tic_toc_timestamp = -1.0;
@@ -7259,13 +7259,13 @@
           T ts = tv[0];
           T fs = fv[0];
           for (octave_idx_type i = 0; i < n; i++)
-            rv[i] = mv[i] ? ts : fs;
+            rv[i] = (mv[i] ? ts : fs);
         }
       else
         {
           T ts = tv[0];
           for (octave_idx_type i = 0; i < n; i++)
-            rv[i] = mv[i] ? ts : fv[i];
+            rv[i] = (mv[i] ? ts : fv[i]);
         }
     }
   else
@@ -7274,12 +7274,12 @@
         {
           T fs = fv[0];
           for (octave_idx_type i = 0; i < n; i++)
-            rv[i] = mv[i] ? tv[i] : fs;
+            rv[i] = (mv[i] ? tv[i] : fs);
         }
       else
         {
           for (octave_idx_type i = 0; i < n; i++)
-            rv[i] = mv[i] ? tv[i] : fv[i];
+            rv[i] = (mv[i] ? tv[i] : fv[i]);
         }
     }
 
@@ -7334,7 +7334,7 @@
   octave_value mask_val = args(0);
 
   if (mask_val.is_scalar_type ())
-    retval = mask_val.is_true () ? args(1) : args(2);
+    retval = (mask_val.is_true () ? args(1) : args(2));
   else
     {
       boolNDArray mask = mask_val.bool_array_value ();
--- a/libinterp/corefcn/defaults.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/defaults.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -123,7 +123,7 @@
 {
   std::string oh = octave::sys::env::getenv ("OCTAVE_HOME");
 
-  Voctave_home = oh.empty () ? std::string (OCTAVE_PREFIX) : oh;
+  Voctave_home = (oh.empty () ? std::string (OCTAVE_PREFIX) : oh);
 }
 
 static void
@@ -313,7 +313,7 @@
 
       std::string env_file = octave::sys::env::getenv ("OCTAVE_DOC_CACHE_FILE");
 
-      Vdoc_cache_file = env_file.empty () ? def_file : env_file;
+      Vdoc_cache_file = (env_file.empty () ? def_file : env_file);
     }
 }
 
@@ -326,7 +326,7 @@
 
       std::string env_file = octave::sys::env::getenv ("OCTAVE_TEXI_MACROS_FILE");
 
-      Vtexi_macros_file = env_file.empty () ? def_file : env_file;
+      Vtexi_macros_file = (env_file.empty () ? def_file : env_file);
     }
 }
 
@@ -339,7 +339,7 @@
 
       std::string oct_info_file = octave::sys::env::getenv ("OCTAVE_INFO_FILE");
 
-      Vinfo_file = oct_info_file.empty () ? std_info_file : oct_info_file;
+      Vinfo_file = (oct_info_file.empty () ? std_info_file : oct_info_file);
     }
 }
 
--- a/libinterp/corefcn/det.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/det.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -137,9 +137,9 @@
           FloatMatrix m = arg.float_matrix_value ();
 
           MAYBE_CAST (rep, octave_float_matrix);
-          MatrixType mtype = rep ? rep -> matrix_type () : MatrixType ();
+          MatrixType mtype = (rep ? rep -> matrix_type () : MatrixType ());
           FloatDET det = m.determinant (mtype, info, rcond);
-          retval(0) = info == -1 ? 0.0f : det.value ();
+          retval(0) = (info == -1 ? 0.0f : det.value ());
           retval(1) = rcond;
           if (rep)
             rep->matrix_type (mtype);
@@ -152,9 +152,9 @@
           FloatComplexMatrix m = arg.float_complex_matrix_value ();
 
           MAYBE_CAST (rep, octave_float_complex_matrix);
-          MatrixType mtype = rep ? rep -> matrix_type () : MatrixType ();
+          MatrixType mtype = (rep ? rep -> matrix_type () : MatrixType ());
           FloatComplexDET det = m.determinant (mtype, info, rcond);
-          retval(0) = info == -1 ? FloatComplex (0.0) : det.value ();
+          retval(0) = (info == -1 ? FloatComplex (0.0) : det.value ());
           retval(1) = rcond;
           if (rep)
             rep->matrix_type (mtype);
@@ -172,7 +172,7 @@
               SparseMatrix m = arg.sparse_matrix_value ();
 
               DET det = m.determinant (info, rcond);
-              retval(0) = info == -1 ? 0.0 : det.value ();
+              retval(0) = (info == -1 ? 0.0 : det.value ());
               retval(1) = rcond;
             }
           else
@@ -180,10 +180,10 @@
               Matrix m = arg.matrix_value ();
 
               MAYBE_CAST (rep, octave_matrix);
-              MatrixType mtype = rep ? rep -> matrix_type ()
-                                     : MatrixType ();
+              MatrixType mtype = (rep ? rep -> matrix_type ()
+                                      : MatrixType ());
               DET det = m.determinant (mtype, info, rcond);
-              retval(0) = info == -1 ? 0.0 : det.value ();
+              retval(0) = (info == -1 ? 0.0 : det.value ());
               retval(1) = rcond;
               if (rep)
                 rep->matrix_type (mtype);
@@ -199,7 +199,7 @@
               SparseComplexMatrix m = arg.sparse_complex_matrix_value ();
 
               ComplexDET det = m.determinant (info, rcond);
-              retval(0) = info == -1 ? Complex (0.0) : det.value ();
+              retval(0) = (info == -1 ? Complex (0.0) : det.value ());
               retval(1) = rcond;
             }
           else
@@ -207,10 +207,10 @@
               ComplexMatrix m = arg.complex_matrix_value ();
 
               MAYBE_CAST (rep, octave_complex_matrix);
-              MatrixType mtype = rep ? rep -> matrix_type ()
-                                     : MatrixType ();
+              MatrixType mtype = (rep ? rep -> matrix_type ()
+                                      : MatrixType ());
               ComplexDET det = m.determinant (mtype, info, rcond);
-              retval(0) = info == -1 ? Complex (0.0) : det.value ();
+              retval(0) = (info == -1 ? Complex (0.0) : det.value ());
               retval(1) = rcond;
               if (rep)
                 rep->matrix_type (mtype);
--- a/libinterp/corefcn/eig.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/eig.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -188,7 +188,7 @@
     }
 
   // Default is to balance
-  const bool balance = no_balance_flag ? false : true;
+  const bool balance = (no_balance_flag ? false : true);
   const bool force_qz = qz_flag;
 
 
--- a/libinterp/corefcn/error.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/error.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -735,7 +735,7 @@
   else if (warn_opt == 1)
     {
       bool fmt_suppresses_backtrace = false;
-      size_t fmt_len = fmt ? strlen (fmt) : 0;
+      size_t fmt_len = (fmt ? strlen (fmt) : 0);
       fmt_suppresses_backtrace = (fmt_len > 0 && fmt[fmt_len-1] == '\n');
 
       if (fmt_suppresses_backtrace && fmt_len > 1)
@@ -863,7 +863,7 @@
 
       frame.name = name(i).string_value ();
       frame.line = line(i).int_value ();
-      frame.column = have_column ? column(i).int_value () : -1;
+      frame.column = (have_column ? column(i).int_value () : -1);
 
       frames.push_back (frame);
     }
--- a/libinterp/corefcn/file-io.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/file-io.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -984,7 +984,7 @@
   retval(1) = os.error ();
 
   std::string result = ostr->str ();
-  char type = fmt_arg.is_sq_string () ? '\'' : '"';
+  char type = (fmt_arg.is_sq_string () ? '\'' : '"');
 
   retval(0) = (result.empty () ? octave_value (charMatrix (1, 0), type)
                                : octave_value (result, type));
--- a/libinterp/corefcn/filter.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/filter.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -48,7 +48,7 @@
   octave_idx_type a_len = a.numel ();
   octave_idx_type b_len = b.numel ();
 
-  octave_idx_type ab_len = a_len > b_len ? a_len : b_len;
+  octave_idx_type ab_len = (a_len > b_len ? a_len : b_len);
 
   // FIXME: The two lines below should be unecessary because
   //        this template is called with a and b as column vectors
--- a/libinterp/corefcn/find.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/find.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -49,7 +49,7 @@
     idx = nda.find ();
 
   // The maximum element is always at the end.
-  octave_idx_type iext = idx.is_empty () ? 0 : idx.xelem (idx.numel () - 1) + 1;
+  octave_idx_type iext = (idx.is_empty () ? 0 : idx.xelem (idx.numel () - 1) + 1);
 
   switch (nargout)
     {
--- a/libinterp/corefcn/gammainc.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/gammainc.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -114,15 +114,15 @@
             {
               float a = a_arg.float_value ();
 
-              retval = lower ? octave::math::gammainc (x, a)
-                             : 1.0f - octave::math::gammainc (x, a);
+              retval = (lower ? octave::math::gammainc (x, a)
+                              : 1.0f - octave::math::gammainc (x, a));
             }
           else
             {
               FloatNDArray a = a_arg.float_array_value ();
 
-              retval = lower ? octave::math::gammainc (x, a)
-                             : 1.0f - octave::math::gammainc (x, a);
+              retval = (lower ? octave::math::gammainc (x, a)
+                              : 1.0f - octave::math::gammainc (x, a));
             }
         }
       else
@@ -133,15 +133,15 @@
             {
               float a = a_arg.float_value ();
 
-              retval = lower ? octave::math::gammainc (x, a)
-                             : 1.0f - octave::math::gammainc (x, a);
+              retval = (lower ? octave::math::gammainc (x, a)
+                              : 1.0f - octave::math::gammainc (x, a));
             }
           else
             {
               FloatNDArray a = a_arg.float_array_value ();
 
-              retval = lower ? octave::math::gammainc (x, a)
-                             : 1.0f - octave::math::gammainc (x, a);
+              retval = (lower ? octave::math::gammainc (x, a)
+                              : 1.0f - octave::math::gammainc (x, a));
             }
         }
     }
@@ -155,15 +155,15 @@
             {
               double a = a_arg.double_value ();
 
-              retval = lower ? octave::math::gammainc (x, a)
-                             : 1.0 - octave::math::gammainc (x, a);
+              retval = (lower ? octave::math::gammainc (x, a)
+                              : 1.0 - octave::math::gammainc (x, a));
             }
           else
             {
               NDArray a = a_arg.array_value ();
 
-              retval = lower ? octave::math::gammainc (x, a)
-                             : 1.0 - octave::math::gammainc (x, a);
+              retval = (lower ? octave::math::gammainc (x, a)
+                              : 1.0 - octave::math::gammainc (x, a));
             }
         }
       else
@@ -174,15 +174,15 @@
             {
               double a = a_arg.double_value ();
 
-              retval = lower ? octave::math::gammainc (x, a)
-                             : 1.0 - octave::math::gammainc (x, a);
+              retval = (lower ? octave::math::gammainc (x, a)
+                              : 1.0 - octave::math::gammainc (x, a));
             }
           else
             {
               NDArray a = a_arg.array_value ();
 
-              retval = lower ? octave::math::gammainc (x, a)
-                             : 1.0 - octave::math::gammainc (x, a);
+              retval = (lower ? octave::math::gammainc (x, a)
+                              : 1.0 - octave::math::gammainc (x, a));
             }
         }
     }
--- a/libinterp/corefcn/gcd.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/gcd.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -145,8 +145,8 @@
       yy = ty;
     }
 
-  x = a >= 0 ? lx : -lx;
-  y = b >= 0 ? ly : -ly;
+  x = (a >= 0 ? lx : -lx);
+  y = (b >= 0 ? ly : -ly);
 
   return aa;
 }
--- a/libinterp/corefcn/gl-render.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/gl-render.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -1488,10 +1488,12 @@
         // tick texts
         if (xticklabels.numel () > 0)
           {
-            int halign = (xstate == AXE_HORZ_DIR ? 1 :
-                          (xyzSym || is_origin_low ? 0 : 2));
-            int valign = (xstate == AXE_VERT_DIR ? 1 :
-                          (x2Dtop || is_origin_low ? 0 : 2));
+            int halign = (xstate == AXE_HORZ_DIR
+                          ? 1
+                          : (xyzSym || is_origin_low ? 0 : 2));
+            int valign = (xstate == AXE_VERT_DIR
+                          ? 1
+                          : (x2Dtop || is_origin_low ? 0 : 2));
 
             if (tick_along_z)
               render_ticktexts (xticks, xticklabels, x_min, x_max,
@@ -1668,10 +1670,12 @@
         // tick texts
         if (yticklabels.numel () > 0)
           {
-            int halign = (ystate == AXE_HORZ_DIR ? 1 :
-                          (! xyzSym || y2Dright || is_origin_low ? 0 : 2));
-            int valign = (ystate == AXE_VERT_DIR ? 1 :
-                          (is_origin_low ? 0 : 2));
+            int halign = (ystate == AXE_HORZ_DIR
+                          ? 1
+                          : (! xyzSym || y2Dright || is_origin_low ? 0 : 2));
+            int valign = (ystate == AXE_VERT_DIR
+                          ? 1
+                          : (is_origin_low ? 0 : 2));
 
             if (tick_along_z)
               render_ticktexts (yticks, yticklabels, y_min, y_max,
@@ -2254,7 +2258,7 @@
                     (props.backfacelighting_is ("reverselit") ? 1 : 2));
 
     Matrix fcolor = (fc_mode == TEXTURE ? Matrix (1, 3, 1.0)
-                     : props.get_facecolor_rgb ());
+                                        : props.get_facecolor_rgb ());
     Matrix ecolor = props.get_edgecolor_rgb ();
 
     float as = props.get_ambientstrength ();
@@ -2330,8 +2334,8 @@
 
             if ((fl_mode > 0) && (num_lights > 0))
               glEnable (GL_LIGHTING);
-            glShadeModel ((fc_mode == INTERP || fl_mode == GOURAUD) ? GL_SMOOTH
-                          : GL_FLAT);
+            glShadeModel ((fc_mode == INTERP || fl_mode == GOURAUD)
+                          ? GL_SMOOTH : GL_FLAT);
             set_polygon_offset (true, 1);
             if (fc_mode == TEXTURE)
               glEnable (GL_TEXTURE_2D);
@@ -2534,8 +2538,8 @@
 
             if ((el_mode > 0) && (num_lights > 0))
               glEnable (GL_LIGHTING);
-            glShadeModel ((ec_mode == INTERP || el_mode == GOURAUD) ? GL_SMOOTH
-                          : GL_FLAT);
+            glShadeModel ((ec_mode == INTERP || el_mode == GOURAUD)
+                          ? GL_SMOOTH : GL_FLAT);
 
             set_linestyle (props.get_linestyle (), false,
                            props.get_linewidth ());
@@ -2806,9 +2810,9 @@
                   }
 
                 Matrix lc = (do_edge ? (mecolor.is_empty () ? cc : mecolor)
-                             : Matrix ());
+                                     : Matrix ());
                 Matrix fc = (do_face ? (mfcolor.is_empty () ? cc : mfcolor)
-                             : Matrix ());
+                                     : Matrix ());
 
                 draw_marker (x(j1,i), y(j,i1), z(j,i), lc, fc);
               }
@@ -3279,9 +3283,9 @@
                 }
 
               Matrix lc = (do_edge ? (mecolor.is_empty () ? cc : mecolor)
-                           : Matrix ());
+                                   : Matrix ());
               Matrix fc = (do_face ? (mfcolor.is_empty () ? cc : mfcolor)
-                           : Matrix ());
+                                   : Matrix ());
 
               draw_marker (v(idx,0), v(idx,1), (has_z ? v(idx,2) : 0), lc, fc);
             }
--- a/libinterp/corefcn/graphics.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/graphics.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -1829,8 +1829,8 @@
     }
   else if (type.compare ("handle"))
     {
-      double hv = args.length () > 0 ? args(0).double_value ()
-                                     : octave::numeric_limits<double>::NaN ();
+      double hv = (args.length () > 0 ? args(0).double_value ()
+                                      : octave::numeric_limits<double>::NaN ());
 
       graphics_handle gh (hv);
 
@@ -5565,7 +5565,7 @@
       // does not seem to be required.  Need investigation with concrete
       // graphics toolkit to see results visually.
       if (false && dowarp)
-        af = 1.0 / (xM > yM ? xM : yM);
+        af = (1.0 / (xM > yM ? xM : yM));
       else
         {
           if ((bb(2)/bb(3)) > (xM/yM))
@@ -5754,7 +5754,7 @@
 
   xySym = (xd*yd*(xPlane-xPlaneN)*(yPlane-yPlaneN) > 0);
   zSign = (zd*(zPlane-zPlaneN) <= 0);
-  xyzSym = zSign ? xySym : ! xySym;
+  xyzSym = (zSign ? xySym : ! xySym);
   xpTick = (zSign ? xPlaneN : xPlane);
   ypTick = (zSign ? yPlaneN : yPlane);
   zpTick = (zSign ? zPlane : zPlaneN);
@@ -6477,8 +6477,8 @@
 axes::properties::get_boundingbox (bool internal,
                                    const Matrix& parent_pix_size) const
 {
-  Matrix pos = internal ? get_position ().matrix_value ()
-                        : get_outerposition ().matrix_value ();
+  Matrix pos = (internal ? get_position ().matrix_value ()
+                         : get_outerposition ().matrix_value ());
   Matrix parent_size (parent_pix_size);
 
   if (parent_size.is_empty ())
@@ -7177,7 +7177,7 @@
   if (n_ticks < 2)
     return;
 
-  int n = is_logscale ? 8 : 4;
+  int n = (is_logscale ? 8 : 4);
   Matrix tmp_mticks (1, n * (n_ticks - 1));
 
   for (int i = 0; i < n_ticks-1; i++)
@@ -8194,7 +8194,7 @@
 void
 axes::properties::clear_zoom_stack (bool do_unzoom)
 {
-  size_t items_to_leave_on_stack = do_unzoom ? 7 : 0;
+  size_t items_to_leave_on_stack = (do_unzoom ? 7 : 0);
 
   while (zoom_stack.size () > items_to_leave_on_stack)
     zoom_stack.pop_front ();
--- a/libinterp/corefcn/graphics.in.h	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/graphics.in.h	Thu Apr 27 17:33:10 2017 -0700
@@ -197,8 +197,11 @@
   scaler (const std::string& s)
     : rep (s == "log"
            ? new log_scaler ()
-           : (s == "neglog" ? new neg_log_scaler ()
-              : (s == "linear" ? new lin_scaler () : new base_scaler ())))
+           : (s == "neglog"
+              ? new neg_log_scaler ()
+              : (s == "linear"
+                 ? new lin_scaler ()
+                 : new base_scaler ())))
   { }
 
   ~scaler (void) { delete rep; }
@@ -1443,7 +1446,7 @@
 protected:
   bool do_set (const octave_value& v)
   {
-    octave_value tmp = v.is_sparse_type () ? v.full_value () : v;
+    octave_value tmp = (v.is_sparse_type () ? v.full_value () : v);
 
     if (! validate (tmp))
       error ("invalid value for array property \"%s\"",
@@ -4779,18 +4782,18 @@
       Matrix lim;
 
       lim = Matrix (1, 3, pos(0));
-      lim(2) = lim(2) <= 0 ? octave::numeric_limits<double>::Inf () : lim(2);
+      lim(2) = (lim(2) <= 0 ? octave::numeric_limits<double>::Inf () : lim(2));
       set_xlim (lim);
 
       lim = Matrix (1, 3, pos(1));
-      lim(2) = lim(2) <= 0 ? octave::numeric_limits<double>::Inf () : lim(2);
+      lim(2) = (lim(2) <= 0 ? octave::numeric_limits<double>::Inf () : lim(2));
       set_ylim (lim);
 
       if (pos.numel () == 3)
         {
           lim = Matrix (1, 3, pos(2));
-          lim(2) = lim(2) <= 0 ? octave::numeric_limits<double>::Inf ()
-                               : lim(2);
+          lim(2) = (lim(2) <= 0 ? octave::numeric_limits<double>::Inf ()
+                                : lim(2));
           set_zliminclude ("on");
           set_zlim (lim);
         }
--- a/libinterp/corefcn/help.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/help.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -813,8 +813,8 @@
     {
       const int dir_len = dir.size ();
       const int filename_len = filename.size ();
-      const int max_allowed_seps = octave::sys::file_ops::is_dir_sep (dir[dir_len-1]) ? 0
-                                                                         : 1;
+      const int max_allowed_seps =
+        (octave::sys::file_ops::is_dir_sep (dir[dir_len-1]) ? 0 : 1);
 
       int num_seps = 0;
       for (int i = dir_len; i < filename_len; i++)
--- a/libinterp/corefcn/hex2num.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/hex2num.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -74,7 +74,7 @@
 
   for (size_t i = 0; i < nbytes; i++)
     {
-      size_t k = swap_bytes ? nbytes - i - 1 : i;
+      size_t k = (swap_bytes ? nbytes - i - 1 : i);
 
       unsigned char ch1 = (j < nc) ? hex[j++] : '0';
       unsigned char ch2 = (j < nc) ? hex[j++] : '0';
@@ -229,7 +229,7 @@
 
   for (size_t i = 0; i < n; i++)
     {
-      size_t j = swap_bytes ? n - i - 1 : i;
+      size_t j = (swap_bytes ? n - i - 1 : i);
 
       unsigned char ch = cp[j];
 
--- a/libinterp/corefcn/inv.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/inv.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -182,7 +182,7 @@
 
   retval(0) = result;
   if (nargout > 1)
-    retval(1) = isfloat ? octave_value (frcond) : octave_value (rcond);
+    retval(1) = (isfloat ? octave_value (frcond) : octave_value (rcond));
 
   bool rcond_plus_one_eq_one = false;
 
--- a/libinterp/corefcn/load-save.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/load-save.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -1637,7 +1637,7 @@
         use_zlib = false;
 
       std::ios::openmode mode
-        = append ? (std::ios::app | std::ios::ate) : std::ios::out;
+        = (append ? (std::ios::app | std::ios::ate) : std::ios::out);
 
       if (format == LS_BINARY
 #if defined (HAVE_HDF5)
--- a/libinterp/corefcn/lookup.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/lookup.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -347,8 +347,8 @@
               for (octave_idx_type i = 0; i < nval; i++)
                 {
                   octave_idx_type j = idx.xelem (i);
-                  ridx.xelem (i) = (j != 0 && str_y(i) == str_table(j-1)) ? j
-                                                                          : 0;
+                  ridx.xelem (i) = (j != 0 && str_y(i) == str_table(j-1) ? j
+                                                                         : 0);
                 }
             }
 
--- a/libinterp/corefcn/ls-mat4.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/ls-mat4.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -328,7 +328,7 @@
             SparseComplexMatrix smc = SparseComplexMatrix (data, r, c,
                                                            nr_new, nc_new);
 
-            tc = order ? smc.transpose () : smc;
+            tc = (order ? smc.transpose () : smc);
           }
         else
           {
@@ -352,7 +352,7 @@
 
             SparseMatrix sm = SparseMatrix (data, r, c, nr_new, nc_new);
 
-            tc = order ? sm.transpose () : sm;
+            tc = (order ? sm.transpose () : sm);
           }
       }
     else
@@ -380,10 +380,10 @@
               for (octave_idx_type i = 0; i < nr; i++)
                 ctmp (i,j) = Complex (re(i,j), im(i,j));
 
-            tc = order ? ctmp.transpose () : ctmp;
+            tc = (order ? ctmp.transpose () : ctmp);
           }
         else
-          tc = order ? re.transpose () : re;
+          tc = (order ? re.transpose () : re);
 
         if (type == 1)
           tc = tc.convert_to_str (false, true, '\'');
@@ -422,7 +422,7 @@
       uint32_t nnz = len + 1;
       os.write (reinterpret_cast<char *> (&nnz), 4);
 
-      uint32_t iscmplx = tc.is_complex_type () ? 4 : 3;
+      uint32_t iscmplx = (tc.is_complex_type () ? 4 : 3);
       os.write (reinterpret_cast<char *> (&iscmplx), 4);
 
       uint32_t tmp = 0;
@@ -433,7 +433,7 @@
       os.write (reinterpret_cast<char *> (&nr), 4);
       os.write (reinterpret_cast<char *> (&nc), 4);
 
-      int32_t imag = tc.is_complex_type () ? 1 : 0;
+      int32_t imag = (tc.is_complex_type () ? 1 : 0);
       os.write (reinterpret_cast<char *> (&imag), 4);
 
       len = nr * nc;
--- a/libinterp/corefcn/ls-mat5.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/ls-mat5.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -2588,7 +2588,7 @@
     {
       if (tc.is_inline_function () || tc.is_object ())
         {
-          std::string classname = tc.is_object () ? tc.class_name () : "inline";
+          std::string classname = (tc.is_object () ? tc.class_name () : "inline");
           size_t namelen = classname.length ();
 
           if (namelen > max_namelen)
--- a/libinterp/corefcn/ls-oct-binary.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/ls-oct-binary.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -178,7 +178,7 @@
 
   if (! is.read (reinterpret_cast<char *> (&tmp), 1))
     error ("load: trouble reading binary file '%s'", filename.c_str ());
-  global = tmp ? 1 : 0;
+  global = (tmp ? 1 : 0);
 
   tmp = 0;
   if (! is.read (reinterpret_cast<char *> (&tmp), 1))
--- a/libinterp/corefcn/ls-oct-text.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/ls-oct-text.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -268,7 +268,7 @@
     {
       global = SUBSTRING_COMPARE_EQ (tag, 0, 6, "global");
 
-      typ = global ? tag.substr (7) : tag;
+      typ = (global ? tag.substr (7) : tag);
     }
   else
     typ = tag;
--- a/libinterp/corefcn/lu.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/lu.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -614,7 +614,7 @@
 
   octave_value argl = args(0);
   octave_value argu = args(1);
-  octave_value argp = pivoted ? args(2) : octave_value ();
+  octave_value argp = (pivoted ? args(2) : octave_value ());
   octave_value argx = args(2 + pivoted);
   octave_value argy = args(3 + pivoted);
 
--- a/libinterp/corefcn/max.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/max.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -243,7 +243,7 @@
 
   octave_value_list retval (nargout > 1 ? 2 : 1);
 
-  const char *func = ismin ? "min" : "max";
+  const char *func = (ismin ? "min" : "max");
 
   if (nargin == 3 || nargin == 1)
     {
@@ -917,7 +917,7 @@
   if (nargin < 1 || nargin > 2)
     print_usage ();
 
-  const char *func = ismin ? "cummin" : "cummax";
+  const char *func = (ismin ? "cummin" : "cummax");
 
   octave_value arg = args(0);
   int dim = -1;
--- a/libinterp/corefcn/mex.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/mex.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -125,7 +125,7 @@
       {
         // Both nsubs and ndims should be at least 2 here.
 
-        mwSize n = nsubs <= ndims ? nsubs : ndims;
+        mwSize n = (nsubs <= ndims ? nsubs : ndims);
 
         retval = subs[--n];
 
@@ -1676,7 +1676,7 @@
     for (mwIndex i = 0; i < nel * nfields; i++)
       {
         mxArray *ptr = val.data[i];
-        data[i] = ptr ? ptr->dup () : 0;
+        data[i] = (ptr ? ptr->dup () : 0);
       }
   }
 
@@ -1916,7 +1916,7 @@
     for (mwIndex i = 0; i < nel; i++)
       {
         mxArray *ptr = val.data[i];
-        data[i] = ptr ? ptr->dup () : 0;
+        data[i] = (ptr ? ptr->dup () : 0);
       }
   }
 
@@ -3097,7 +3097,7 @@
   for (int i = 0; i < nargin; i++)
     argin[i] = 0;
 
-  int nout = nargout == 0 ? 1 : nargout;
+  int nout = (nargout == 0 ? 1 : nargout);
   OCTAVE_LOCAL_BUFFER (mxArray *, argout, nout);
   for (int i = 0; i < nout; i++)
     argout[i] = 0;
@@ -3225,7 +3225,7 @@
 {
   mxArray *mx = NULL;
 
-  int old_flag = mex_context ? mex_context->trap_feval_error : 0;
+  int old_flag = (mex_context ? mex_context->trap_feval_error : 0);
   mexSetTrapFlag (1);
   if (mexCallMATLAB (nargout, argout, nargin, argin, fname))
     {
--- a/libinterp/corefcn/oct-hist.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/oct-hist.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -98,7 +98,7 @@
       int val;
 
       if (sscanf (env_size.c_str (), "%d", &val) == 1)
-        size = val > 0 ? val : 0;
+        size = (val > 0 ? val : 0);
     }
 
   return size;
--- a/libinterp/corefcn/oct-map.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/oct-map.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -1164,7 +1164,7 @@
 {
   Cell tmp;
   iterator p = seek (k);
-  Cell& ref = p != end () ? contents (p) : tmp;
+  Cell& ref = (p != end () ? contents (p) : tmp);
 
   if (&ref == &tmp)
     ref = Cell (dimensions);
--- a/libinterp/corefcn/oct-procbuf.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/oct-procbuf.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -73,7 +73,7 @@
   if (is_open ())
     return 0;
 
-  f = octave_popen (command, (mode & std::ios::in) ? "r" : "w");
+  f = (octave_popen (command, (mode & std::ios::in) ? "r" : "w"));
 
   if (! f)
     return 0;
@@ -152,7 +152,7 @@
       return 0;
     }
 
-  f = ::fdopen (parent_end, (mode & std::ios::in) ? "r" : "w");
+  f = (::fdopen (parent_end, (mode & std::ios::in) ? "r" : "w"));
 
   if (mode & std::ios::out)
     ::setvbuf (f, 0, _IOLBF, BUFSIZ);
--- a/libinterp/corefcn/oct-stream.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/oct-stream.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -2715,8 +2715,9 @@
     if (err & 1)
       done_after = out.size () + 1;
 
-    int valid_rows = (row == ntimes) ? ntimes
-      : (((err & 1) && (err & 8)) ? row : row+1);
+    int valid_rows = (row == ntimes
+                      ? ntimes
+                      : ((err & 1) && (err & 8)) ? row : row+1);
     dim_vector dv (valid_rows, 1);
 
     ra_idx(0) = 0;
@@ -2975,8 +2976,8 @@
                 if (ch2 == 'f')
                   {
                     inf = true;
-                    re = (ch == '+') ? octave::numeric_limits<double>::Inf ()
-                      : -octave::numeric_limits<double>::Inf ();
+                    re = (ch == '+' ? octave::numeric_limits<double>::Inf ()
+                                    : -octave::numeric_limits<double>::Inf ());
                     value = 0;
                   }
                 else
@@ -3849,7 +3850,7 @@
 
     int i;
     int (*compare)(const char *, const char *, size_t);
-    compare = case_sensitive ? strncmp : strncasecmp;
+    compare = (case_sensitive ? strncmp : strncasecmp);
 
     for (i = 0; i < targets.numel (); i++)
       {
@@ -4422,7 +4423,7 @@
 #define BEGIN_C_CONVERSION()                                            \
   is.unsetf (std::ios::skipws);                                         \
                                                                         \
-  int width = elt->width ? elt->width : 1;                              \
+  int width = (elt->width ? elt->width : 1);                            \
                                                                         \
   std::string tmp (width, '\0');                                        \
                                                                         \
@@ -5515,8 +5516,8 @@
 
   size_t len = arg.length ();
 
-  size_t fw = nsa > 0 ? sa_1 : (elt->fw == -1 ? len : elt->fw);
-  size_t prec = nsa > 1 ? sa_2 : (elt->prec == -1 ? len : elt->prec);
+  size_t fw = (nsa > 0 ? sa_1 : (elt->fw == -1 ? len : elt->fw));
+  size_t prec = (nsa > 1 ? sa_2 : (elt->prec == -1 ? len : elt->prec));
 
   os << std::setw (fw)
      << (left ? std::left : std::right)
@@ -5651,7 +5652,7 @@
     else
       {
         static std::string llmod
-          = sizeof (long) == sizeof (int64_t) ? "l" : "ll";
+          = (sizeof (long) == sizeof (int64_t) ? "l" : "ll");
 
         char type = elt->type;
 
@@ -5891,7 +5892,7 @@
   std::string
   base_stream::error (bool clear_err, int& err_num)
   {
-    err_num = fail ? -1 : 0;
+    err_num = (fail ? -1 : 0);
 
     std::string tmp = errmsg;
 
--- a/libinterp/corefcn/pr-output.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/pr-output.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -180,7 +180,7 @@
   float_format& width (int w) { fw = w; return *this; }
 
   float_format& trailing_zeros (bool tz = true)
-  { sp = tz ? std::ios::showpoint : 0; return *this; }
+  { sp = (tz ? std::ios::showpoint : 0); return *this; }
 
   friend std::ostream& operator << (std::ostream& os,
                                     const pr_engineering_float& pef);
@@ -573,7 +573,7 @@
     }
   else if (bank_format)
     {
-      fw = digits < 0 ? 5 : digits + 4;
+      fw = (digits < 0 ? 5 : digits + 4);
       if (inf_or_nan && fw < 5)
         fw = 5;
       rd = 2;
@@ -600,12 +600,12 @@
       if (digits > 0)
         {
           ld = digits;
-          rd = prec > digits ? prec - digits : prec;
+          rd = (prec > digits ? prec - digits : prec);
         }
       else
         {
           ld = 1;
-          rd = prec > digits ? prec - digits : prec;
+          rd = (prec > digits ? prec - digits : prec);
         }
 
       fw = 1 + ld + 1 + rd;
@@ -665,7 +665,7 @@
 
   bool int_only = (! inf_or_nan && octave::math::x_nint (d) == d);
 
-  double d_abs = d < 0.0 ? -d : d;
+  double d_abs = (d < 0.0 ? -d : d);
 
   int digits = (inf_or_nan || d_abs == 0.0) ? 0 : num_digits (d_abs);
 
@@ -696,8 +696,8 @@
     }
   else if (bank_format)
     {
-      int digits = x_max > x_min ? x_max : x_min;
-      fw = digits <= 0 ? 5 : digits + 4;
+      int digits = (x_max > x_min ? x_max : x_min);
+      fw = (digits <= 0 ? 5 : digits + 4);
       if (inf_or_nan && fw < 5)
         fw = 5;
       rd = 2;
@@ -721,8 +721,8 @@
     }
   else if (int_or_inf_or_nan)
     {
-      int digits = x_max > x_min ? x_max : x_min;
-      fw = digits <= 0 ? 2 : digits + 1;
+      int digits = (x_max > x_min ? x_max : x_min);
+      fw = (digits <= 0 ? 2 : digits + 1);
       if (inf_or_nan && fw < 4)
         fw = 4;
       rd = fw;
@@ -733,13 +733,13 @@
       if (x_max > 0)
         {
           ld_max = x_max;
-          rd_max = prec > x_max ? prec - x_max : prec;
+          rd_max = (prec > x_max ? prec - x_max : prec);
           x_max++;
         }
       else
         {
           ld_max = 1;
-          rd_max = prec > x_max ? prec - x_max : prec;
+          rd_max = (prec > x_max ? prec - x_max : prec);
           x_max = -x_max + 1;
         }
 
@@ -747,18 +747,18 @@
       if (x_min > 0)
         {
           ld_min = x_min;
-          rd_min = prec > x_min ? prec - x_min : prec;
+          rd_min = (prec > x_min ? prec - x_min : prec);
           x_min++;
         }
       else
         {
           ld_min = 1;
-          rd_min = prec > x_min ? prec - x_min : prec;
+          rd_min = (prec > x_min ? prec - x_min : prec);
           x_min = -x_min + 1;
         }
 
-      ld = ld_max > ld_min ? ld_max : ld_min;
-      rd = rd_max > rd_min ? rd_max : rd_min;
+      ld = (ld_max > ld_min ? ld_max : ld_min);
+      rd = (rd_max > rd_min ? rd_max : rd_min);
 
       fw = 1 + ld + 1 + rd;
       if (inf_or_nan && fw < 4)
@@ -822,9 +822,9 @@
   double max_abs = pr_max_internal (m_abs);
   double min_abs = pr_min_internal (m_abs);
 
-  int x_max = max_abs == 0.0 ? 0 : num_digits (max_abs);
-
-  int x_min = min_abs == 0.0 ? 0 : num_digits (min_abs);
+  int x_max = (max_abs == 0.0 ? 0 : num_digits (max_abs));
+
+  int x_min = (min_abs == 0.0 ? 0 : num_digits (min_abs));
 
   scale = (x_max == 0 || int_or_inf_or_nan)
           ? 1.0 : std::pow (10.0, calc_scale_exp (x_max - 1));
@@ -853,7 +853,7 @@
     {
       int digits = r_x;
       i_fw = 0;
-      r_fw = digits <= 0 ? 5 : digits + 4;
+      r_fw = (digits <= 0 ? 5 : digits + 4);
       if (inf_or_nan && r_fw < 5)
         r_fw = 5;
       rd = 2;
@@ -872,8 +872,8 @@
     }
   else if (inf_or_nan || int_only)
     {
-      int digits = x_max > x_min ? x_max : x_min;
-      i_fw = digits <= 0 ? 1 : digits;
+      int digits = (x_max > x_min ? x_max : x_min);
+      i_fw = (digits <= 0 ? 1 : digits);
       r_fw = i_fw + 1;
       if (inf_or_nan && i_fw < 3)
         {
@@ -888,13 +888,13 @@
       if (x_max > 0)
         {
           ld_max = x_max;
-          rd_max = prec > x_max ? prec - x_max : prec;
+          rd_max = (prec > x_max ? prec - x_max : prec);
           x_max++;
         }
       else
         {
           ld_max = 1;
-          rd_max = prec > x_max ? prec - x_max : prec;
+          rd_max = (prec > x_max ? prec - x_max : prec);
           x_max = -x_max + 1;
         }
 
@@ -902,18 +902,18 @@
       if (x_min > 0)
         {
           ld_min = x_min;
-          rd_min = prec > x_min ? prec - x_min : prec;
+          rd_min = (prec > x_min ? prec - x_min : prec);
           x_min++;
         }
       else
         {
           ld_min = 1;
-          rd_min = prec > x_min ? prec - x_min : prec;
+          rd_min = (prec > x_min ? prec - x_min : prec);
           x_min = -x_min + 1;
         }
 
-      ld = ld_max > ld_min ? ld_max : ld_min;
-      rd = rd_max > rd_min ? rd_max : rd_min;
+      ld = (ld_max > ld_min ? ld_max : ld_min);
+      rd = (rd_max > rd_min ? rd_max : rd_min);
 
       i_fw = ld + 1 + rd;
       r_fw = i_fw + 1;
@@ -1002,8 +1002,8 @@
   bool int_only = (octave::math::x_nint (rp) == rp
                    && octave::math::x_nint (ip) == ip);
 
-  double r_abs = rp < 0.0 ? -rp : rp;
-  double i_abs = ip < 0.0 ? -ip : ip;
+  double r_abs = (rp < 0.0 ? -rp : rp);
+  double i_abs = (ip < 0.0 ? -ip : ip);
 
   int r_x = (! octave::math::finite (rp)
              || r_abs == 0.0) ? 0 : num_digits (r_abs);
@@ -1054,9 +1054,9 @@
     }
   else if (bank_format)
     {
-      int digits = r_x_max > r_x_min ? r_x_max : r_x_min;
+      int digits = (r_x_max > r_x_min ? r_x_max : r_x_min);
       i_fw = 0;
-      r_fw = digits <= 0 ? 5 : digits + 4;
+      r_fw = (digits <= 0 ? 5 : digits + 4);
       if (inf_or_nan && r_fw < 5)
         r_fw = 5;
       rd = 2;
@@ -1086,8 +1086,8 @@
     }
   else if (int_or_inf_or_nan)
     {
-      int digits = x_max > x_min ? x_max : x_min;
-      i_fw = digits <= 0 ? 1 : digits;
+      int digits = (x_max > x_min ? x_max : x_min);
+      i_fw = (digits <= 0 ? 1 : digits);
       r_fw = i_fw + 1;
       if (inf_or_nan && i_fw < 3)
         {
@@ -1102,13 +1102,13 @@
       if (x_max > 0)
         {
           ld_max = x_max;
-          rd_max = prec > x_max ? prec - x_max : prec;
+          rd_max = (prec > x_max ? prec - x_max : prec);
           x_max++;
         }
       else
         {
           ld_max = 1;
-          rd_max = prec > x_max ? prec - x_max : prec;
+          rd_max = (prec > x_max ? prec - x_max : prec);
           x_max = -x_max + 1;
         }
 
@@ -1116,18 +1116,18 @@
       if (x_min > 0)
         {
           ld_min = x_min;
-          rd_min = prec > x_min ? prec - x_min : prec;
+          rd_min = (prec > x_min ? prec - x_min : prec);
           x_min++;
         }
       else
         {
           ld_min = 1;
-          rd_min = prec > x_min ? prec - x_min : prec;
+          rd_min = (prec > x_min ? prec - x_min : prec);
           x_min = -x_min + 1;
         }
 
-      ld = ld_max > ld_min ? ld_max : ld_min;
-      rd = rd_max > rd_min ? rd_max : rd_min;
+      ld = (ld_max > ld_min ? ld_max : ld_min);
+      rd = (rd_max > rd_min ? rd_max : rd_min);
 
       i_fw = ld + 1 + rd;
       r_fw = i_fw + 1;
@@ -1226,16 +1226,16 @@
   double i_max_abs = pr_max_internal (i_m_abs);
   double i_min_abs = pr_min_internal (i_m_abs);
 
-  int r_x_max = r_max_abs == 0.0 ? 0 : num_digits (r_max_abs);
-
-  int r_x_min = r_min_abs == 0.0 ? 0 : num_digits (r_min_abs);
-
-  int i_x_max = i_max_abs == 0.0 ? 0 : num_digits (i_max_abs);
-
-  int i_x_min = i_min_abs == 0.0 ? 0 : num_digits (i_min_abs);
-
-  int x_max = r_x_max > i_x_max ? r_x_max : i_x_max;
-  int x_min = r_x_min > i_x_min ? r_x_min : i_x_min;
+  int r_x_max = (r_max_abs == 0.0 ? 0 : num_digits (r_max_abs));
+
+  int r_x_min = (r_min_abs == 0.0 ? 0 : num_digits (r_min_abs));
+
+  int i_x_max = (i_max_abs == 0.0 ? 0 : num_digits (i_max_abs));
+
+  int i_x_min = (i_min_abs == 0.0 ? 0 : num_digits (i_min_abs));
+
+  int x_max = (r_x_max > i_x_max ? r_x_max : i_x_max);
+  int x_min = (r_x_min > i_x_min ? r_x_min : i_x_min);
 
   scale = (x_max == 0 || int_or_inf_or_nan)
           ? 1.0 : std::pow (10.0, calc_scale_exp (x_max - 1));
@@ -1260,8 +1260,8 @@
     }
   else if (bank_format)
     {
-      int digits = x_max > x_min ? x_max : x_min;
-      fw = digits < 0 ? 5 : digits + 4;
+      int digits = (x_max > x_min ? x_max : x_min);
+      fw = (digits < 0 ? 5 : digits + 4);
       rd = 2;
     }
   else if (hex_format)
@@ -1276,7 +1276,7 @@
     }
   else if (all_ints)
     {
-      int digits = x_max > x_min ? x_max : x_min;
+      int digits = (x_max > x_min ? x_max : x_min);
       fw = digits + 1;
       rd = fw;
     }
@@ -1291,13 +1291,13 @@
       if (x_max > 0)
         {
           ld_max = x_max;
-          rd_max = prec > x_max ? prec - x_max : prec;
+          rd_max = (prec > x_max ? prec - x_max : prec);
           x_max++;
         }
       else
         {
           ld_max = 1;
-          rd_max = prec > x_max ? prec - x_max : prec;
+          rd_max = (prec > x_max ? prec - x_max : prec);
           x_max = -x_max + 1;
         }
 
@@ -1305,18 +1305,18 @@
       if (x_min > 0)
         {
           ld_min = x_min;
-          rd_min = prec > x_min ? prec - x_min : prec;
+          rd_min = (prec > x_min ? prec - x_min : prec);
           x_min++;
         }
       else
         {
           ld_min = 1;
-          rd_min = prec > x_min ? prec - x_min : prec;
+          rd_min = (prec > x_min ? prec - x_min : prec);
           x_min = -x_min + 1;
         }
 
-      ld = ld_max > ld_min ? ld_max : ld_min;
-      rd = rd_max > rd_min ? rd_max : rd_min;
+      ld = (ld_max > ld_min ? ld_max : ld_min);
+      rd = (rd_max > rd_min ? rd_max : rd_min);
 
       fw = ld + rd + 3;
     }
@@ -1378,12 +1378,12 @@
 
   bool all_ints = r.all_elements_are_ints ();
 
-  double max_abs = r_max < 0.0 ? -r_max : r_max;
-  double min_abs = r_min < 0.0 ? -r_min : r_min;
-
-  int x_max = max_abs == 0.0 ? 0 : num_digits (max_abs);
-
-  int x_min = min_abs == 0.0 ? 0 : num_digits (min_abs);
+  double max_abs = (r_max < 0.0 ? -r_max : r_max);
+  double min_abs = (r_min < 0.0 ? -r_min : r_min);
+
+  int x_max = (max_abs == 0.0 ? 0 : num_digits (max_abs));
+
+  int x_min = (min_abs == 0.0 ? 0 : num_digits (min_abs));
 
   scale = (x_max == 0 || all_ints)
           ? 1.0 : std::pow (10.0, calc_scale_exp (x_max - 1));
@@ -1788,7 +1788,7 @@
               octave_idx_type col = 0;
               while (col < nc)
                 {
-                  octave_idx_type lim = col + inc < nc ? col + inc : nc;
+                  octave_idx_type lim = (col + inc < nc ? col + inc : nc);
 
                   for (octave_idx_type j = col; j < lim; j++)
                     {
@@ -1829,7 +1829,7 @@
 
           for (octave_idx_type col = 0; col < nc; col += inc)
             {
-              octave_idx_type lim = col + inc < nc ? col + inc : nc;
+              octave_idx_type lim = (col +inc < nc ? col + inc : nc);
 
               pr_col_num_header (os, total_width, max_width, lim, col,
                                  extra_indent);
@@ -1924,7 +1924,7 @@
           octave_idx_type col = 0;
           while (col < nc)
             {
-              octave_idx_type lim = col + inc < nc ? col + inc : nc;
+              octave_idx_type lim = (col +inc < nc ? col + inc : nc);
 
               for (octave_idx_type j = col; j < lim; j++)
                 {
@@ -1973,7 +1973,7 @@
 
           for (octave_idx_type col = 0; col < nc; col += inc)
             {
-              octave_idx_type lim = col + inc < nc ? col + inc : nc;
+              octave_idx_type lim = (col +inc < nc ? col + inc : nc);
 
               pr_col_num_header (os, total_width, max_width, lim, col,
                                  extra_indent);
@@ -2206,7 +2206,7 @@
               octave_idx_type col = 0;
               while (col < nc)
                 {
-                  octave_idx_type lim = col + inc < nc ? col + inc : nc;
+                  octave_idx_type lim = (col +inc < nc ? col + inc : nc);
 
                   for (octave_idx_type j = col; j < lim; j++)
                     {
@@ -2247,7 +2247,7 @@
 
           for (octave_idx_type col = 0; col < nc; col += inc)
             {
-              octave_idx_type lim = col + inc < nc ? col + inc : nc;
+              octave_idx_type lim = (col +inc < nc ? col + inc : nc);
 
               pr_col_num_header (os, total_width, max_width, lim, col,
                                  extra_indent);
@@ -2344,7 +2344,7 @@
           octave_idx_type col = 0;
           while (col < nc)
             {
-              octave_idx_type lim = col + inc < nc ? col + inc : nc;
+              octave_idx_type lim = (col +inc < nc ? col + inc : nc);
 
               for (octave_idx_type j = col; j < lim; j++)
                 {
@@ -2393,7 +2393,7 @@
 
           for (octave_idx_type col = 0; col < nc; col += inc)
             {
-              octave_idx_type lim = col + inc < nc ? col + inc : nc;
+              octave_idx_type lim = (col +inc < nc ? col + inc : nc);
 
               pr_col_num_header (os, total_width, max_width, lim, col,
                                  extra_indent);
@@ -2492,7 +2492,7 @@
           octave_idx_type col = 0;
           while (col < nc)
             {
-              octave_idx_type lim = col + inc < nc ? col + inc : nc;
+              octave_idx_type lim = (col +inc < nc ? col + inc : nc);
 
               for (octave_idx_type j = col; j < lim; j++)
                 {
@@ -2530,7 +2530,7 @@
 
           for (octave_idx_type col = 0; col < nc; col += inc)
             {
-              octave_idx_type lim = col + inc < nc ? col + inc : nc;
+              octave_idx_type lim = (col +inc < nc ? col + inc : nc);
 
               pr_col_num_header (os, total_width, max_width, lim, col,
                                  extra_indent);
@@ -2720,7 +2720,7 @@
           octave_idx_type col = 0;
           while (col < num_elem)
             {
-              octave_idx_type lim = col + inc < num_elem ? col + inc : num_elem;
+              octave_idx_type lim = (col +inc < num_elem ? col + inc : num_elem);
 
               pr_col_num_header (os, total_width, max_width, lim, col,
                                  extra_indent);
@@ -3328,7 +3328,8 @@
 
               for (octave_idx_type col = 0; col < n_cols; col += inc)
                 {
-                  octave_idx_type lim = col + inc < n_cols ? col + inc : n_cols;
+                  octave_idx_type lim = (col +inc < n_cols ? col + inc
+                                                           : n_cols);
 
                   pr_col_num_header (os, total_width, max_width, lim, col,
                                      extra_indent);
@@ -3497,7 +3498,7 @@
     {
       std::ostringstream buf;
       arg.print (buf);
-      retval = octave_value (buf.str (), arg.is_dq_string () ? '"' : '\'');
+      retval = (octave_value (buf.str (), arg.is_dq_string () ? '"' : '\''));
     }
 
   return retval;
@@ -4112,7 +4113,7 @@
   else
     {
       if (nargout >= 2)
-        retval(1) = Vcompact_format ? "compact" : "loose";
+        retval(1) = (Vcompact_format ? "compact" : "loose");
 
       retval(0) = format_string;
     }
--- a/libinterp/corefcn/rand.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/rand.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -171,7 +171,7 @@
             for (octave_idx_type i = 0; i < n; i++)
               {
                 // Negative dimensions treated as zero for Matlab compatibility
-                dims(i) = base >= 0 ? base : 0;
+                dims(i) = (base >= 0 ? base : 0);
                 base += incr;
               }
 
@@ -198,7 +198,7 @@
               {
                 // Negative dimensions treated as zero for Matlab compatibility
                 octave_idx_type elt = iv(i);
-                dims(i) = elt >=0 ? elt : 0;
+                dims(i) = (elt >=0 ? elt : 0);
               }
 
             goto gen_matrix;
@@ -258,7 +258,7 @@
                     fcn);
 
                 // Negative dimensions treated as zero for Matlab compatibility
-                dims(i) = elt >= 0 ? elt : 0;
+                dims(i) = (elt >= 0 ? elt : 0);
               }
 
             goto gen_matrix;
@@ -1096,7 +1096,7 @@
   NDArray r = octave_rand::nd_array (dim_vector (1, m));
   double *rvec = r.fortran_vec ();
 
-  octave_idx_type idx_len = short_shuffle ? m : n;
+  octave_idx_type idx_len = (short_shuffle ? m : n);
   Array<octave_idx_type> idx;
   try
     {
--- a/libinterp/corefcn/regexp.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/regexp.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -386,9 +386,9 @@
     {
       octave::regexp::match_data::const_iterator p = rx_lst.begin ();
 
-      retval(4) = sz ? p->tokens () : Cell ();
-      retval(3) = sz ? p->match_string () : "";
-      retval(2) = sz ? p->token_extents () : Matrix ();
+      retval(4) = (sz ? p->tokens () : Cell ());
+      retval(3) = (sz ? p->match_string () : "");
+      retval(2) = (sz ? p->token_extents () : Matrix ());
 
       if (sz)
         {
@@ -848,7 +848,7 @@
   octave_value_list retval;
 
   if (args(0).is_cell () || args(1).is_cell ())
-    retval = octcellregexp (args, (nargout > 0 ? nargout : 1), "regexp");
+    retval = (octcellregexp (args, (nargout > 0 ? nargout : 1), "regexp"));
   else
     retval = octregexp (args, nargout, "regexp");
 
@@ -1422,8 +1422,7 @@
           ret(i) = new_args(0);
         }
 
-      retval = args(0).is_cell () ? ovl (ret)
-                                  : ovl (ret(0));
+      retval = (args(0).is_cell () ? ovl (ret) : ovl (ret(0)));
     }
   else
     retval = octregexprep (args, "regexprep");
--- a/libinterp/corefcn/schur.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/schur.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -149,7 +149,7 @@
     }
   else
     {
-      char ord_char = ord.empty () ? 'U' : ord[0];
+      char ord_char = (ord.empty () ? 'U' : ord[0]);
 
       if (ord_char != 'U' && ord_char != 'A' && ord_char != 'D'
           && ord_char != 'u' && ord_char != 'a' && ord_char != 'd')
--- a/libinterp/corefcn/str2double.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/str2double.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -141,7 +141,7 @@
         {
           // just 'i' and string is finished.  Return immediately.
           imag = true;
-          num = negative ? -1.0 : 1.0;
+          num = (negative ? -1.0 : 1.0);
           return is;
         }
       else
--- a/libinterp/corefcn/strfns.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/strfns.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -355,7 +355,7 @@
 
           boolNDArray output (cell_val.dims (), false);
 
-          std::string s = r == 0 ? "" : str[0];
+          std::string s = (r == 0 ? "" : str[0]);
 
           if (cell_val.is_cellstr ())
             {
@@ -750,7 +750,7 @@
 
   std::string tmp = args(1).xstring_value ("CODEPAGE must be a string");
   const char *codepage
-    = tmp.empty () ? octave_locale_charset_wrapper () : tmp.c_str ();
+    = (tmp.empty () ? octave_locale_charset_wrapper () : tmp.c_str ());
 
   charNDArray native_bytes = args(0).char_array_value ();
 
@@ -796,7 +796,7 @@
 
   std::string tmp = args(1).xstring_value ("CODEPAGE must be a string");
   const char *codepage
-    = tmp.empty () ? octave_locale_charset_wrapper () : tmp.c_str ();
+    = (tmp.empty () ? octave_locale_charset_wrapper () : tmp.c_str ());
 
   charNDArray utf8_str = args(0).xchar_array_value ("UTF8_STR must be a string");
 
--- a/libinterp/corefcn/symtab.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/symtab.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -603,7 +603,7 @@
                        && (jtyp == btyp_float
                            || jtyp == btyp_float_complex)))));
 
-        sup_table[i][j] = use_j ? jtyp : ityp;
+        sup_table[i][j] = (use_j ? jtyp : ityp);
       }
 
   return sup_table;
--- a/libinterp/corefcn/sysdep.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/sysdep.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -410,7 +410,7 @@
 #if defined (ONLRET)
         s.c_oflag &= ~(ONLRET);
 #endif
-        s.c_cc[VMIN] = wait ? 1 : 0;
+        s.c_cc[VMIN] = (wait ? 1 : 0);
         s.c_cc[VTIME] = 0;
       }
     else
@@ -453,7 +453,7 @@
 #if defined (ONLRET)
         s.c_oflag &= ~(ONLRET);
 #endif
-        s.c_cc[VMIN] = wait ? 1 : 0;
+        s.c_cc[VMIN] = (wait ? 1 : 0);
       }
     else
       {
--- a/libinterp/corefcn/tril.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/tril.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -291,11 +291,11 @@
 
         if (lower)
           {
-            octave_idx_type st = nc < nr + k ? nc : nr + k;
+            octave_idx_type st = (nc < nr + k ? nc : nr + k);
 
             for (octave_idx_type j = 1; j <= st; j++)
               {
-                octave_idx_type nr_limit = 1 > j - k ? 1 : j - k;
+                octave_idx_type nr_limit = (1 > j - k ? 1 : j - k);
                 ov_idx(1) = static_cast<double> (j);
                 ov_idx(0) = Range (nr_limit, nr);
                 std::list<octave_value_list> idx;
@@ -306,11 +306,11 @@
           }
         else
           {
-            octave_idx_type st = k + 1 > 1 ? k + 1 : 1;
+            octave_idx_type st = (k + 1 > 1 ? k + 1 : 1);
 
             for (octave_idx_type j = st; j <= nc; j++)
               {
-                octave_idx_type nr_limit = nr < j - k ? nr : j - k;
+                octave_idx_type nr_limit = (nr < j - k ? nr : j - k);
                 ov_idx(1) = static_cast<double> (j);
                 ov_idx(0) = Range (1, nr_limit);
                 std::list<octave_value_list> idx;
--- a/libinterp/corefcn/variables.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/variables.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -1592,8 +1592,9 @@
             // What happens if whos_line_format contains negative numbers
             // at param_length positions?
             param.balance = (b < 0 ? 0 : param.balance);
-            param.first_parameter_length = (b < 0 ? 0 :
-                                            param.first_parameter_length);
+            param.first_parameter_length = (b < 0
+                                            ? 0
+                                            : param.first_parameter_length);
             param.parameter_length = (a < 0
                                       ? 0
                                       : (param.parameter_length
--- a/libinterp/corefcn/xdiv.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/corefcn/xdiv.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -58,13 +58,13 @@
 bool
 mx_leftdiv_conform (const T1& a, const T2& b, blas_trans_type blas_trans)
 {
-  octave_idx_type a_nr = blas_trans == blas_no_trans ? a.rows () : a.cols ();
+  octave_idx_type a_nr = (blas_trans == blas_no_trans ? a.rows () : a.cols ());
   octave_idx_type b_nr = b.rows ();
 
   if (a_nr != b_nr)
     {
-      octave_idx_type a_nc = blas_trans == blas_no_trans ? a.cols ()
-                                                         : a.rows ();
+      octave_idx_type a_nc = (blas_trans == blas_no_trans ? a.cols ()
+                                                          : a.rows ());
       octave_idx_type b_nc = b.cols ();
 
       octave::err_nonconformant ("operator \\", a_nr, a_nc, b_nr, b_nc);
@@ -799,7 +799,7 @@
   for (octave_idx_type j = 0; j < n; j++)
     {
       for (octave_idx_type i = 0; i < l; i++)
-        xx[i] = dd[i] != S () ? aa[i] / dd[i] : T ();
+        xx[i] = (dd[i] != S () ? aa[i] / dd[i] : T ());
       for (octave_idx_type i = l; i < m; i++)
         xx[i] = T ();
       aa += k; xx += m;
@@ -878,7 +878,7 @@
   T *xx = x.fortran_vec ();
 
   for (octave_idx_type i = 0; i < lk; i++)
-    xx[i] = dd[i] != S () ? aa[i] / dd[i] : T ();
+    xx[i] = (dd[i] != S () ? aa[i] / dd[i] : T ());
   for (octave_idx_type i = lk; i < l; i++)
     xx[i] = T ();
 
@@ -953,7 +953,7 @@
   T *xx = x.fortran_vec ();
 
   for (octave_idx_type i = 0; i < lk; i++)
-    xx[i] = dd[i] != S () ? aa[i] / dd[i] : T ();
+    xx[i] = (dd[i] != S () ? aa[i] / dd[i] : T ());
   for (octave_idx_type i = lk; i < l; i++)
     xx[i] = T ();
 
--- a/libinterp/dldfcn/audiodevinfo.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/dldfcn/audiodevinfo.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -168,7 +168,7 @@
 
       const PaHostApiInfo *api_info = Pa_GetHostApiInfo (device_info->hostApi);
 
-      const char *driver = api_info ? api_info->name : "";
+      const char *driver = (api_info ? api_info->name : "");
 
       char name[128];
       sprintf (name, "%s (%s)", device_info->name, driver);
@@ -878,7 +878,7 @@
              "invalid default audio device ID = %d", device);
 
   output_parameters.suggestedLatency
-    = device_info ? device_info->defaultHighOutputLatency : -1;
+    = (device_info ? device_info->defaultHighOutputLatency : -1);
 
   output_parameters.hostApiSpecificStreamInfo = 0;
 }
@@ -922,7 +922,7 @@
              "invalid default audio device ID = %d", device);
 
   output_parameters.suggestedLatency
-    = device_info ? device_info->defaultHighOutputLatency : -1;
+    = (device_info ? device_info->defaultHighOutputLatency : -1);
 
   output_parameters.hostApiSpecificStreamInfo = 0;
 }
@@ -1514,7 +1514,7 @@
              "invalid default audio device ID = %d", device);
 
   input_parameters.suggestedLatency
-    = device_info ? device_info->defaultHighInputLatency : -1;
+    = (device_info ? device_info->defaultHighInputLatency : -1);
 
   input_parameters.hostApiSpecificStreamInfo = 0;
 }
--- a/libinterp/dldfcn/audioread.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/dldfcn/audioread.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -108,8 +108,8 @@
       if (range.numel () != 2)
         error ("audioread: invalid specification for range of frames");
 
-      double dstart = octave::math::isinf (range(0)) ? info.frames : range(0);
-      double dend = octave::math::isinf (range(1)) ? info.frames : range(1);
+      double dstart = (octave::math::isinf (range(0)) ? info.frames : range(0));
+      double dend = (octave::math::isinf (range(1)) ? info.frames : range(1));
 
       if (dstart < 1 || dstart > dend || dend > info.frames
           || octave::math::x_nint (dstart) != dstart
--- a/libinterp/dldfcn/colamd.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/dldfcn/colamd.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -62,8 +62,8 @@
       // L(k,:) pattern: all nodes reachable in etree from nz in A(0:k-1,k)
       Parent[k] = n ;                // parent of k is not yet known
       Flag[k] = k ;                  // mark node k as visited
-      octave_idx_type kk = (P) ? P[k]  // kth original, or permuted, column
-                               : (k);
+      octave_idx_type kk = (P ? P[k]  // kth original, or permuted, column
+                              : (k));
       octave_idx_type p2 = cidx[kk+1];
       for (octave_idx_type p = cidx[kk] ; p < p2 ; p++)
         {
--- a/libinterp/dldfcn/gzip.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/dldfcn/gzip.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -418,7 +418,7 @@
               throw std::runtime_error ("failed to read source file");
 
             m_strm->next_in = buf_in;
-            flush = std::feof (m_source.m_fp) ? Z_FINISH : Z_NO_FLUSH;
+            flush = (std::feof (m_source.m_fp) ? Z_FINISH : Z_NO_FLUSH);
 
             // If deflate returns Z_OK and with zero avail_out, it must be
             // called again after making room in the output buffer because
--- a/libinterp/octave-value/ov-base-diag.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/octave-value/ov-base-diag.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -488,7 +488,7 @@
       || ! extract_keyword (is, "columns", c, true))
     error ("load: failed to extract number of rows and columns");
 
-  octave_idx_type l = r < c ? r : c;
+  octave_idx_type l = (r < c ? r : c);
   MT tmp (l, 1);
   is >> tmp;
 
--- a/libinterp/octave-value/ov-base-mat.h	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/octave-value/ov-base-mat.h	Thu Apr 27 17:33:10 2017 -0700
@@ -190,7 +190,7 @@
   idx_vector set_idx_cache (const idx_vector& idx) const
   {
     delete idx_cache;
-    idx_cache = idx ? new idx_vector (idx) : 0;
+    idx_cache = (idx ? new idx_vector (idx) : 0);
     return idx;
   }
 
--- a/libinterp/octave-value/ov-base-scalar.h	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/octave-value/ov-base-scalar.h	Thu Apr 27 17:33:10 2017 -0700
@@ -85,7 +85,7 @@
 
   int ndims (void) const { return 2; }
 
-  octave_idx_type nnz (void) const { return (scalar != ST ()) ? 1 : 0; }
+  octave_idx_type nnz (void) const { return (scalar != ST () ? 1 : 0); }
 
   octave_value permute (const Array<int>&, bool = false) const;
 
--- a/libinterp/octave-value/ov-class.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/octave-value/ov-class.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -382,8 +382,8 @@
 
                 Cell t = tmp.index (idx.front ());
 
-                retval(0) = (t.numel () == 1) ? t(0)
-                                              : octave_value (t, true);
+                retval(0) = (t.numel () == 1 ? t(0)
+                                             : octave_value (t, true));
 
                 // We handled two index elements, so tell
                 // next_subsref to skip both of them.
@@ -1201,7 +1201,7 @@
           if (! is)
             break;
 
-          Cell tcell = t2.is_cell () ? t2.xcell_value ("load: internal error loading class elements") : Cell (t2);
+          Cell tcell = (t2.is_cell () ? t2.xcell_value ("load: internal error loading class elements") : Cell (t2));
 
           m.assign (nm, tcell);
         }
@@ -1325,7 +1325,7 @@
           if (! is)
             break;
 
-          Cell tcell = t2.is_cell () ? t2.xcell_value ("load: internal error loading class elements") : Cell (t2);
+          Cell tcell = (t2.is_cell () ? t2.xcell_value ("load: internal error loading class elements") : Cell (t2));
 
           m.assign (nm, tcell);
         }
@@ -1573,7 +1573,7 @@
     {
       octave_value t2 = dsub.tc;
 
-      Cell tcell = t2.is_cell () ? t2.xcell_value ("load: internal error loading class elements") : Cell (t2);
+      Cell tcell = (t2.is_cell () ? t2.xcell_value ("load: internal error loading class elements") : Cell (t2));
 
       m.assign (dsub.name, tcell);
 
--- a/libinterp/octave-value/ov-classdef.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/octave-value/ov-classdef.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -71,7 +71,7 @@
 err_property_access (const std::string& from, const cdef_property& prop,
                      bool is_set = false)
 {
-  octave_value acc = prop.get (is_set ? "SetAccess" : "GetAccess");
+  octave_value acc = (prop.get (is_set ? "SetAccess" : "GetAccess"));
   std::string acc_s;
 
   if (acc.is_string ())
@@ -3109,7 +3109,7 @@
   switch (type[0])
     {
     case '(':
-      retval = execute (idx.front (), type.length () > 1 ? 1 : nargout, true);
+      retval = (execute (idx.front (), type.length () > 1 ? 1 : nargout, true));
       break;
 
     default:
--- a/libinterp/octave-value/ov-fcn-handle.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/octave-value/ov-fcn-handle.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -382,7 +382,7 @@
   else
     {
       octave_function *f = function_value ();
-      std::string fnm = f ? f->fcn_file_name () : "";
+      std::string fnm = (f ? f->fcn_file_name () : "");
 
       os << "# octaveroot: " << OCTAVE_EXEC_PREFIX << "\n";
       if (! fnm.empty ())
@@ -556,7 +556,7 @@
       std::ostringstream nmbuf;
 
       octave_function *f = function_value ();
-      std::string fnm = f ? f->fcn_file_name () : "";
+      std::string fnm = (f ? f->fcn_file_name () : "");
 
       nmbuf << nm << "\n" << OCTAVE_EXEC_PREFIX << "\n" << fnm;
 
@@ -851,7 +851,7 @@
       std::string octaveroot = OCTAVE_EXEC_PREFIX;
 
       octave_function *f = function_value ();
-      std::string fpath = f ? f->fcn_file_name () : "";
+      std::string fpath = (f ? f->fcn_file_name () : "");
 
       H5Sclose (space_hid);
       hdims[0] = 1;
@@ -1717,7 +1717,7 @@
 
   octave_fcn_handle *fh = args(0).fcn_handle_value ("functions: FCN_HANDLE argument must be a function handle object");
 
-  octave_function *fcn = fh ? fh->function_value () : 0;
+  octave_function *fcn = (fh ? fh->function_value () : 0);
 
   if (! fcn)
     error ("functions: FCN_HANDLE is not a valid function handle object");
@@ -1929,7 +1929,7 @@
   octave_fcn_handle *retval = 0;
 
   octave_user_function *usr_fcn = f.user_function_value (false);
-  octave::tree_parameter_list *param_list = usr_fcn ? usr_fcn->parameter_list () : 0;
+  octave::tree_parameter_list *param_list = (usr_fcn ? usr_fcn->parameter_list () : 0);
 
   octave::tree_statement_list *cmd_list = 0;
   octave::tree_expression *body_expr = 0;
@@ -1974,7 +1974,7 @@
               for (auto& param_p : *param_list)
                 {
                   octave::tree_decl_elt *elt = param_p;
-                  octave::tree_identifier *id = elt ? elt->ident () : 0;
+                  octave::tree_identifier *id = (elt ? elt->ident () : 0);
                   if (id && ! id->is_black_hole ())
                     arginmap[id->name ()] = npar;
                 }
--- a/libinterp/octave-value/ov-range.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/octave-value/ov-range.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -654,7 +654,7 @@
   Range r = range_value ();
   double range_vals[3];
   range_vals[0] = r.base ();
-  range_vals[1] = r.inc () != 0 ? r.limit () : r.numel ();
+  range_vals[1] = (r.inc () != 0 ? r.limit () : r.numel ());
   range_vals[2] = r.inc ();
 
   if (H5Dwrite (data_hid, type_hid, octave_H5S_ALL, octave_H5S_ALL,
--- a/libinterp/octave-value/ov-range.h	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/octave-value/ov-range.h	Thu Apr 27 17:33:10 2017 -0700
@@ -308,7 +308,7 @@
   idx_vector set_idx_cache (const idx_vector& idx) const
   {
     delete idx_cache;
-    idx_cache = idx ? new idx_vector (idx) : 0;
+    idx_cache = (idx ? new idx_vector (idx) : 0);
     return idx;
   }
 
--- a/libinterp/octave-value/ov-struct.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/octave-value/ov-struct.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -740,7 +740,7 @@
           if (! is)
             break;
 
-          Cell tcell = t2.is_cell () ? t2.xcell_value ("load: internal error loading struct elements") : Cell (t2);
+          Cell tcell = (t2.is_cell () ? t2.xcell_value ("load: internal error loading struct elements") : Cell (t2));
 
           m.setfield (nm, tcell);
         }
@@ -853,7 +853,7 @@
           if (! is)
             break;
 
-          Cell tcell = t2.is_cell () ? t2.xcell_value ("load: internal error loading struct elements") : Cell (t2);
+          Cell tcell = (t2.is_cell () ? t2.xcell_value ("load: internal error loading struct elements") : Cell (t2));
 
           m.setfield (nm, tcell);
         }
@@ -954,7 +954,7 @@
     {
       octave_value t2 = dsub.tc;
 
-      Cell tcell = t2.is_cell () ? t2.xcell_value ("load: internal error loading struct elements") : Cell (t2);
+      Cell tcell = (t2.is_cell () ? t2.xcell_value ("load: internal error loading struct elements") : Cell (t2));
 
       m.setfield (dsub.name, tcell);
 
@@ -1978,7 +1978,7 @@
       if (! args(2).is_real_scalar ())
         error ("cell2struct: DIM must be a real scalar");
 
-      dim = nargin == 2 ? 0 : args(2).int_value () - 1;
+      dim = (nargin == 2 ? 0 : args(2).int_value () - 1);
     }
 
   if (dim < 0)
@@ -1987,7 +1987,7 @@
   const Cell vals = args(0).cell_value ();
   const Array<std::string> fields = args(1).cellstr_value ();
 
-  octave_idx_type ext = vals.ndims () > dim ? vals.dims ()(dim) : 1;
+  octave_idx_type ext = (vals.ndims () > dim ? vals.dims ()(dim) : 1);
 
   if (ext != fields.numel ())
     error ("cell2struct: number of FIELDS does not match dimension");
--- a/libinterp/octave-value/ov-usr-fcn.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/octave-value/ov-usr-fcn.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -866,7 +866,7 @@
 
       octave::tree_parameter_list *param_list = fcn->parameter_list ();
 
-      retval = param_list ? param_list->length () : 0;
+      retval = (param_list ? param_list->length () : 0);
       if (fcn->takes_varargs ())
         retval = -1 - retval;
     }
@@ -985,7 +985,7 @@
 
       octave::tree_parameter_list *ret_list = fcn->return_list ();
 
-      retval = ret_list ? ret_list->length () : 0;
+      retval = (ret_list ? ret_list->length () : 0);
 
       if (fcn->takes_var_return ())
         retval = -1 - retval;
--- a/libinterp/octave-value/ov.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/octave-value/ov.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -2615,7 +2615,7 @@
           retval = octave_value (r, is_for_cmd_expr);
 
           if (result_is_str)
-            retval = retval.convert_to_str (false, true, dq_str ? '"' : '\'');
+            retval = (retval.convert_to_str (false, true, dq_str ? '"' : '\''));
         }
     }
 
--- a/libinterp/octave.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/octave.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -346,7 +346,7 @@
 
   void application::interactive (bool arg)
   {
-    interpreter *interp = instance ? instance->m_interpreter : 0;
+    interpreter *interp = (instance ? instance->m_interpreter : 0);
 
     if (interp)
       interp->interactive (arg);
@@ -359,7 +359,7 @@
 
   bool application::interactive (void)
   {
-    interpreter *interp = instance ? instance->m_interpreter : 0;
+    interpreter *interp = (instance ? instance->m_interpreter : 0);
 
     return interp ? interp->interactive () : false;
   }
--- a/libinterp/operators/op-class.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/operators/op-class.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -79,7 +79,7 @@
     octave_value retval;                                                \
                                                                         \
     std::string dispatch_type                                           \
-      = a1.is_object () ? a1.class_name () : a2.class_name ();          \
+      = (a1.is_object () ? a1.class_name () : a2.class_name ());        \
                                                                         \
     octave_value meth = symbol_table::find_method (#name, dispatch_type); \
                                                                         \
--- a/libinterp/parse-tree/pt-eval.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/parse-tree/pt-eval.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -428,7 +428,7 @@
     int count = 0;
 
     octave_value tmp = symbol_table::varval (".ignored.");
-    const Matrix ignored = tmp.is_defined () ? tmp.matrix_value () : Matrix ();
+    const Matrix ignored = (tmp.is_defined () ? tmp.matrix_value () : Matrix ());
 
     octave_idx_type k = 0;
 
@@ -1151,7 +1151,7 @@
           {
             tree_argument_list *al = *(args.begin ());
 
-            size_t n = al ? al->length () : 0;
+            size_t n = (al ? al->length () : 0);
 
             if (n > 0)
               {
@@ -1222,7 +1222,7 @@
                     octave_value_list tmp_list
                       =tmp.subsref (type.substr (tmpi, i-tmpi), idx, nargout);
 
-                    tmp = tmp_list.length () ? tmp_list(0) : octave_value ();
+                    tmp = (tmp_list.length () ? tmp_list(0) : octave_value ());
                     tmpi = i;
                     idx.clear ();
 
@@ -1295,7 +1295,7 @@
         final_index_error (e, expr);
       }
 
-    octave_value val = retval.length () ? retval(0) : octave_value ();
+    octave_value val = (retval.length () ? retval(0) : octave_value ());
 
     if (val.is_function ())
       {
@@ -1377,7 +1377,7 @@
           }
         else if (result_type == "char")
           {
-            char type = all_dq_strings_p ? '"' : '\'';
+            char type = (all_dq_strings_p ? '"' : '\'');
 
             if (! all_strings_p)
               warn_implicit_conversion ("Octave:num-to-str",
@@ -1479,7 +1479,7 @@
             // insert them in the result matrix.
 
             int dv_len = dv.ndims ();
-            octave_idx_type ntmp = dv_len > 1 ? dv_len : 2;
+            octave_idx_type ntmp = (dv_len > 1 ? dv_len : 2);
             Array<octave_idx_type> ra_idx (dim_vector (ntmp, 1), 0);
 
             for (tm_row_const& row : tmp)
--- a/libinterp/parse-tree/pt-funcall.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/parse-tree/pt-funcall.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -50,7 +50,7 @@
     else
       {
         octave_function *fp = fcn.function_value ();
-        std::string nm = fp ? fp->name () : std::string ("<invalid-function>");
+        std::string nm = (fp ? fp->name () : std::string ("<invalid-function>"));
 
         os << nm << " (";
 
--- a/libinterp/parse-tree/pt-idx.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/parse-tree/pt-idx.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -392,7 +392,7 @@
     tree_index_expression *new_idx_expr
       = new tree_index_expression (line (), column ());
 
-    new_idx_expr->expr = expr ? expr->dup (scope, context) : 0;
+    new_idx_expr->expr = (expr ? expr->dup (scope, context) : 0);
 
     std::list<tree_argument_list *> new_args;
 
--- a/libinterp/parse-tree/pt-jit.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/parse-tree/pt-jit.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -1230,8 +1230,8 @@
   if (extra_arg)
     call_args[call_args.size () - 1] = extra_arg;
 
-  const jit_operation& fres = lhs ? jit_typeinfo::paren_subsasgn ()
-                                  : jit_typeinfo::paren_subsref ();
+  const jit_operation& fres = (lhs ? jit_typeinfo::paren_subsasgn ()
+                                   : jit_typeinfo::paren_subsref ());
 
   return create_checked (fres, call_args);
 }
@@ -2501,8 +2501,8 @@
 jit_info::find (const vmap& extra_vars, const std::string& vname) const
 {
   vmap::const_iterator iter = extra_vars.find (vname);
-  return iter == extra_vars.end () ? symbol_table::varval (vname)
-                                   : *iter->second;
+  return (iter == extra_vars.end () ? symbol_table::varval (vname)
+                                    : *iter->second);
 }
 
 #endif
--- a/libinterp/parse-tree/pt-stmt.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/parse-tree/pt-stmt.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -173,11 +173,11 @@
   {
     tree_statement *new_stmt = new tree_statement ();
 
-    new_stmt->cmd = cmd ? cmd->dup (scope, context) : 0;
+    new_stmt->cmd = (cmd ? cmd->dup (scope, context) : 0);
 
-    new_stmt->expr = expr ? expr->dup (scope, context) : 0;
+    new_stmt->expr = (expr ? expr->dup (scope, context) : 0);
 
-    new_stmt->comm = comm ? comm->dup () : 0;
+    new_stmt->comm = (comm ? comm->dup () : 0);
 
     return new_stmt;
   }
--- a/libinterp/version.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/libinterp/version.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -79,8 +79,8 @@
 octave_name_version_copyright_copying_and_warranty
   (bool html, const std::string& extra_info)
 {
-  std::string br = html ? "<br>\n" : "\n";
-  std::string sep = html ? "\n</p>\n<p>\n" : "\n\n";
+  std::string br = (html ? "<br>\n" : "\n");
+  std::string sep = (html ? "\n</p>\n<p>\n" : "\n\n");
 
   return octave_name_version_and_copyright ()
          + br
@@ -95,7 +95,7 @@
 octave_name_version_copyright_copying_warranty_and_bugs
   (bool html, const std::string& extra_info)
 {
-  std::string sep = html ? "\n</p>\n<p>\n" : "\n\n";
+  std::string sep = (html ? "\n</p>\n<p>\n" : "\n\n");
 
   std::string msg;
 
--- a/liboctave/array/Array-util.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/Array-util.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -495,8 +495,8 @@
   else if (rhdv.ndims () == 2
            && ! i.is_scalar () && ! j.is_scalar ())
     {
-      rdv(0) = icol ? rhdv(0) : i.extent (0);
-      rdv(1) = jcol ? rhdv(1) : j.extent (0);
+      rdv(0) = (icol ? rhdv(0) : i.extent (0));
+      rdv(1) = (jcol ? rhdv(1) : j.extent (0));
     }
   else
     {
--- a/liboctave/array/Array.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/Array.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -1545,7 +1545,7 @@
 
           for (int i = 0; i < ial; i++)
             {
-              octave_idx_type dim_len = i >= nd ? 1 : dimensions(i);
+              octave_idx_type dim_len = (i >= nd ? 1 : dimensions(i));
 
               if (ia(i).length (dim_len) == 0)
                 {
--- a/liboctave/array/CDiagMatrix.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/CDiagMatrix.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -396,7 +396,7 @@
   ComplexDiagMatrix c (a_nr, b_nc);
 
   octave_idx_type len = c.length ();
-  octave_idx_type lenm = len < a_nc ? len : a_nc;
+  octave_idx_type lenm = (len < a_nc ? len : a_nc);
 
   for (octave_idx_type i = 0; i < lenm; i++)
     c.dgxelem (i) = a.dgelem (i) * b.dgelem (i);
@@ -423,7 +423,7 @@
 
   ComplexDiagMatrix c (a_nr, b_nc);
 
-  octave_idx_type len = a_nr < b_nc ? a_nr : b_nc;
+  octave_idx_type len = (a_nr < b_nc ? a_nr : b_nc);
 
   for (octave_idx_type i = 0; i < len; i++)
     {
@@ -453,7 +453,7 @@
 
   ComplexDiagMatrix c (a_nr, b_nc);
 
-  octave_idx_type len = a_nr < b_nc ? a_nr : b_nc;
+  octave_idx_type len = (a_nr < b_nc ? a_nr : b_nc);
 
   for (octave_idx_type i = 0; i < len; i++)
     {
--- a/liboctave/array/CMatrix.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/CMatrix.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -1004,7 +1004,7 @@
 
   if (nr == 1 || nc == 1)
     {
-      npts = nr > nc ? nr : nc;
+      npts = (nr > nc ? nr : nc);
       nsamples = 1;
     }
   else
@@ -1033,7 +1033,7 @@
 
   if (nr == 1 || nc == 1)
     {
-      npts = nr > nc ? nr : nc;
+      npts = (nr > nc ? nr : nc);
       nsamples = 1;
     }
   else
@@ -1183,7 +1183,7 @@
 
   if (nr == 1 || nc == 1)
     {
-      npts = nr > nc ? nr : nc;
+      npts = (nr > nc ? nr : nc);
       nsamples = 1;
     }
   else
@@ -1251,7 +1251,7 @@
 
   if (nr == 1 || nc == 1)
     {
-      npts = nr > nc ? nr : nc;
+      npts = (nr > nc ? nr : nc);
       nsamples = 1;
     }
   else
@@ -2440,7 +2440,7 @@
   else
     {
       volatile F77_INT minmn = (m < n ? m : n);
-      F77_INT maxmn = m > n ? m : n;
+      F77_INT maxmn = (m > n ? m : n);
       rcon = -1.0;
 
       if (m != n)
@@ -2663,7 +2663,7 @@
   else
     {
       volatile F77_INT minmn = (m < n ? m : n);
-      F77_INT maxmn = m > n ? m : n;
+      F77_INT maxmn = (m > n ? m : n);
       rcon = -1.0;
 
       if (m != n)
@@ -3059,8 +3059,8 @@
 
               if (! octave::math::isnan (tmp_min))
                 {
-                  abs_min = real_only ? tmp_min.real ()
-                                      : std::abs (tmp_min);
+                  abs_min = (real_only ? tmp_min.real ()
+                                       : std::abs (tmp_min));
                   break;
                 }
             }
@@ -3072,7 +3072,7 @@
               if (octave::math::isnan (tmp))
                 continue;
 
-              double abs_tmp = real_only ? tmp.real () : std::abs (tmp);
+              double abs_tmp = (real_only ? tmp.real () : std::abs (tmp));
 
               if (abs_tmp < abs_min)
                 {
@@ -3134,8 +3134,8 @@
 
               if (! octave::math::isnan (tmp_max))
                 {
-                  abs_max = real_only ? tmp_max.real ()
-                                      : std::abs (tmp_max);
+                  abs_max = (real_only ? tmp_max.real ()
+                                       : std::abs (tmp_max));
                   break;
                 }
             }
@@ -3147,7 +3147,7 @@
               if (octave::math::isnan (tmp))
                 continue;
 
-              double abs_tmp = real_only ? tmp.real () : std::abs (tmp);
+              double abs_tmp = (real_only ? tmp.real () : std::abs (tmp));
 
               if (abs_tmp > abs_max)
                 {
@@ -3209,8 +3209,8 @@
 
               if (! octave::math::isnan (tmp_min))
                 {
-                  abs_min = real_only ? tmp_min.real ()
-                                      : std::abs (tmp_min);
+                  abs_min = (real_only ? tmp_min.real ()
+                                       : std::abs (tmp_min));
                   break;
                 }
             }
@@ -3222,7 +3222,7 @@
               if (octave::math::isnan (tmp))
                 continue;
 
-              double abs_tmp = real_only ? tmp.real () : std::abs (tmp);
+              double abs_tmp = (real_only ? tmp.real () : std::abs (tmp));
 
               if (abs_tmp < abs_min)
                 {
@@ -3284,8 +3284,8 @@
 
               if (! octave::math::isnan (tmp_max))
                 {
-                  abs_max = real_only ? tmp_max.real ()
-                                      : std::abs (tmp_max);
+                  abs_max = (real_only ? tmp_max.real ()
+                                       : std::abs (tmp_max));
                   break;
                 }
             }
@@ -3297,7 +3297,7 @@
               if (octave::math::isnan (tmp))
                 continue;
 
-              double abs_tmp = real_only ? tmp.real () : std::abs (tmp);
+              double abs_tmp = (real_only ? tmp.real () : std::abs (tmp));
 
               if (abs_tmp > abs_max)
                 {
--- a/liboctave/array/CNDArray.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/CNDArray.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -305,8 +305,8 @@
       Complex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
-      howmany = (stride == 1 ? howmany :
-                 (howmany > stride ? stride : howmany));
+      howmany = (stride == 1 ? howmany
+                             : (howmany > stride ? stride : howmany));
       octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride);
       octave_idx_type dist = (stride == 1 ? npts : 1);
 
@@ -354,8 +354,8 @@
       Complex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
-      howmany = (stride == 1 ? howmany :
-                 (howmany > stride ? stride : howmany));
+      howmany = (stride == 1 ? howmany
+                             : (howmany > stride ? stride : howmany));
       octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride);
       octave_idx_type dist = (stride == 1 ? npts : 1);
 
@@ -403,8 +403,8 @@
       Complex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
-      howmany = (stride == 1 ? howmany :
-                 (howmany > stride ? stride : howmany));
+      howmany = (stride == 1 ? howmany
+                             : (howmany > stride ? stride : howmany));
       octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride);
       octave_idx_type dist = (stride == 1 ? npts : 1);
 
@@ -451,8 +451,8 @@
       Complex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
-      howmany = (stride == 1 ? howmany :
-                 (howmany > stride ? stride : howmany));
+      howmany = (stride == 1 ? howmany
+                             : (howmany > stride ? stride : howmany));
       octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride);
       octave_idx_type dist = (stride == 1 ? npts : 1);
 
--- a/liboctave/array/CSparse.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/CSparse.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -249,7 +249,7 @@
                 }
             }
 
-          idx_arg.elem (j) = octave::math::isnan (tmp_max) ? 0 : idx_j;
+          idx_arg.elem (j) = (octave::math::isnan (tmp_max) ? 0 : idx_j);
           if (abs_max != 0.)
             nel++;
         }
@@ -406,7 +406,7 @@
                 }
             }
 
-          idx_arg.elem (j) = octave::math::isnan (tmp_min) ? 0 : idx_j;
+          idx_arg.elem (j) = (octave::math::isnan (tmp_min) ? 0 : idx_j);
           if (abs_min != 0.)
             nel++;
         }
--- a/liboctave/array/Range.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/Range.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -239,8 +239,8 @@
       reverse = true;
     }
 
-  octave_idx_type tmp = reverse ? nel - 1 : 0;
-  octave_idx_type stp = reverse ? -1 : 1;
+  octave_idx_type tmp = (reverse ? nel - 1 : 0);
+  octave_idx_type stp = (reverse ? -1 : 1);
 
   for (octave_idx_type i = 0; i < nel; i++, tmp += stp)
     psidx[i] = tmp;
@@ -298,7 +298,7 @@
   else if (rng_numel > 1 && rng_inc < 0)
     mode = (mode == ASCENDING) ? UNSORTED : DESCENDING;
   else
-    mode = mode ? mode : ASCENDING;
+    mode = (mode ? mode : ASCENDING);
 
   return mode;
 }
@@ -488,8 +488,8 @@
 
   double t1 = 1.0 + std::floor (x);
   t1 = (ct / q) * (t1 < 0.0 ? -t1 : t1);
-  t1 = rmax < t1 ? rmax : t1;
-  t1 = ct > t1 ? ct : t1;
+  t1 = (rmax < t1 ? rmax : t1);
+  t1 = (ct > t1 ? ct : t1);
   t1 = std::floor (x + t1);
 
   if (x <= 0.0 || (t1 - x) < rmax)
--- a/liboctave/array/Sparse.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/Sparse.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -1428,7 +1428,7 @@
       // since you have a scalar stored as a sparse matrix, and
       // then want to make a dense matrix with sparse representation.
       // Ok, we'll do it, but you deserve what you get!!
-      retval = Sparse<T> (idx_dims(0), idx_dims(1), nz ? data (0) : T ());
+      retval = (Sparse<T> (idx_dims(0), idx_dims(1), nz ? data (0) : T ()));
     }
   else if (nc == 1)
     {
--- a/liboctave/array/chNDArray.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/chNDArray.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -50,7 +50,7 @@
 charNDArray::charNDArray (const char *s)
   : Array<char> ()
 {
-  octave_idx_type n = s ? strlen (s) : 0;
+  octave_idx_type n = (s ? strlen (s) : 0);
 
   resize1 (n);
 
--- a/liboctave/array/dDiagMatrix.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/dDiagMatrix.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -292,7 +292,7 @@
   DiagMatrix c (a_nr, b_nc);
 
   octave_idx_type len = c.length ();
-  octave_idx_type lenm = len < a_nc ? len : a_nc;
+  octave_idx_type lenm = (len < a_nc ? len : a_nc);
 
   for (octave_idx_type i = 0; i < lenm; i++)
     c.dgxelem (i) = a.dgelem (i) * b.dgelem (i);
--- a/liboctave/array/dMatrix.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/dMatrix.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -701,7 +701,7 @@
 
   if (nr == 1 || nc == 1)
     {
-      npts = nr > nc ? nr : nc;
+      npts = (nr > nc ? nr : nc);
       nsamples = 1;
     }
   else
@@ -730,7 +730,7 @@
 
   if (nr == 1 || nc == 1)
     {
-      npts = nr > nc ? nr : nc;
+      npts = (nr > nc ? nr : nc);
       nsamples = 1;
     }
   else
@@ -878,7 +878,7 @@
 
   if (nr == 1 || nc == 1)
     {
-      npts = nr > nc ? nr : nc;
+      npts = (nr > nc ? nr : nc);
       nsamples = 1;
     }
   else
@@ -946,7 +946,7 @@
 
   if (nr == 1 || nc == 1)
     {
-      npts = nr > nc ? nr : nc;
+      npts = (nr > nc ? nr : nc);
       nsamples = 1;
     }
   else
@@ -2096,7 +2096,7 @@
   else
     {
       volatile F77_INT minmn = (m < n ? m : n);
-      F77_INT maxmn = m > n ? m : n;
+      F77_INT maxmn = (m > n ? m : n);
       rcon = -1.0;
       if (m != n)
         {
@@ -2315,7 +2315,7 @@
   else
     {
       volatile F77_INT minmn = (m < n ? m : n);
-      F77_INT maxmn = m > n ? m : n;
+      F77_INT maxmn = (m > n ? m : n);
       rcon = -1.0;
 
       if (m != n)
@@ -2621,7 +2621,7 @@
             }
 
           result.elem (i) = tmp_min;
-          idx_arg.elem (i) = octave::math::isnan (tmp_min) ? 0 : idx_j;
+          idx_arg.elem (i) = (octave::math::isnan (tmp_min) ? 0 : idx_j);
         }
     }
 
@@ -2676,7 +2676,7 @@
             }
 
           result.elem (i) = tmp_max;
-          idx_arg.elem (i) = octave::math::isnan (tmp_max) ? 0 : idx_j;
+          idx_arg.elem (i) = (octave::math::isnan (tmp_max) ? 0 : idx_j);
         }
     }
 
@@ -2731,7 +2731,7 @@
             }
 
           result.elem (j) = tmp_min;
-          idx_arg.elem (j) = octave::math::isnan (tmp_min) ? 0 : idx_i;
+          idx_arg.elem (j) = (octave::math::isnan (tmp_min) ? 0 : idx_i);
         }
     }
 
@@ -2786,7 +2786,7 @@
             }
 
           result.elem (j) = tmp_max;
-          idx_arg.elem (j) = octave::math::isnan (tmp_max) ? 0 : idx_i;
+          idx_arg.elem (j) = (octave::math::isnan (tmp_max) ? 0 : idx_i);
         }
     }
 
--- a/liboctave/array/dNDArray.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/dNDArray.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -346,8 +346,8 @@
       Complex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
-      howmany = (stride == 1 ? howmany :
-                 (howmany > stride ? stride : howmany));
+      howmany = (stride == 1 ? howmany
+                             : (howmany > stride ? stride : howmany));
       octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride);
       octave_idx_type dist = (stride == 1 ? npts : 1);
 
@@ -395,8 +395,8 @@
       Complex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
-      howmany = (stride == 1 ? howmany :
-                 (howmany > stride ? stride : howmany));
+      howmany = (stride == 1 ? howmany
+                             : (howmany > stride ? stride : howmany));
       octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride);
       octave_idx_type dist = (stride == 1 ? npts : 1);
 
@@ -444,8 +444,8 @@
       Complex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
-      howmany = (stride == 1 ? howmany :
-                 (howmany > stride ? stride : howmany));
+      howmany = (stride == 1 ? howmany
+                             : (howmany > stride ? stride : howmany));
       octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride);
       octave_idx_type dist = (stride == 1 ? npts : 1);
 
@@ -492,8 +492,8 @@
       Complex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
-      howmany = (stride == 1 ? howmany :
-                 (howmany > stride ? stride : howmany));
+      howmany = (stride == 1 ? howmany
+                             : (howmany > stride ? stride : howmany));
       octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride);
       octave_idx_type dist = (stride == 1 ? npts : 1);
 
--- a/liboctave/array/dSparse.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/dSparse.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -242,7 +242,7 @@
 
             }
 
-          idx_arg.elem (j) = octave::math::isnan (tmp_max) ? 0 : idx_j;
+          idx_arg.elem (j) = (octave::math::isnan (tmp_max) ? 0 : idx_j);
           if (tmp_max != 0.)
             nel++;
         }
@@ -393,7 +393,7 @@
 
             }
 
-          idx_arg.elem (j) = octave::math::isnan (tmp_min) ? 0 : idx_j;
+          idx_arg.elem (j) = (octave::math::isnan (tmp_min) ? 0 : idx_j);
           if (tmp_min != 0.)
             nel++;
         }
--- a/liboctave/array/dim-vector.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/dim-vector.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -65,7 +65,7 @@
   if (j == 1)
     rep[1] = 1;
 
-  rep[-1] = j > 2 ? j : 2;
+  rep[-1] = (j > 2 ? j : 2);
 }
 
 std::string
@@ -187,7 +187,7 @@
 {
   int orig_nd = ndims ();
   int ndb = dvb.ndims ();
-  int new_nd = dim < ndb ? ndb : dim + 1;
+  int new_nd = (dim < ndb ? ndb : dim + 1);
   if (new_nd > orig_nd)
     resize (new_nd, 1);
   else
--- a/liboctave/array/fCDiagMatrix.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/fCDiagMatrix.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -400,7 +400,7 @@
   FloatComplexDiagMatrix c (a_nr, b_nc);
 
   octave_idx_type len = c.length ();
-  octave_idx_type lenm = len < a_nc ? len : a_nc;
+  octave_idx_type lenm = (len < a_nc ? len : a_nc);
 
   for (octave_idx_type i = 0; i < lenm; i++)
     c.dgxelem (i) = a.dgelem (i) * b.dgelem (i);
@@ -427,7 +427,7 @@
 
   FloatComplexDiagMatrix c (a_nr, b_nc);
 
-  octave_idx_type len = a_nr < b_nc ? a_nr : b_nc;
+  octave_idx_type len = (a_nr < b_nc ? a_nr : b_nc);
 
   for (octave_idx_type i = 0; i < len; i++)
     {
@@ -457,7 +457,7 @@
 
   FloatComplexDiagMatrix c (a_nr, b_nc);
 
-  octave_idx_type len = a_nr < b_nc ? a_nr : b_nc;
+  octave_idx_type len = (a_nr < b_nc ? a_nr : b_nc);
 
   for (octave_idx_type i = 0; i < len; i++)
     {
--- a/liboctave/array/fCMatrix.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/fCMatrix.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -1006,7 +1006,7 @@
 
   if (nr == 1 || nc == 1)
     {
-      npts = nr > nc ? nr : nc;
+      npts = (nr > nc ? nr : nc);
       nsamples = 1;
     }
   else
@@ -1035,7 +1035,7 @@
 
   if (nr == 1 || nc == 1)
     {
-      npts = nr > nc ? nr : nc;
+      npts = (nr > nc ? nr : nc);
       nsamples = 1;
     }
   else
@@ -1185,7 +1185,7 @@
 
   if (nr == 1 || nc == 1)
     {
-      npts = nr > nc ? nr : nc;
+      npts = (nr > nc ? nr : nc);
       nsamples = 1;
     }
   else
@@ -1252,7 +1252,7 @@
 
   if (nr == 1 || nc == 1)
     {
-      npts = nr > nc ? nr : nc;
+      npts = (nr > nc ? nr : nc);
       nsamples = 1;
     }
   else
@@ -2461,7 +2461,7 @@
   else
     {
       volatile F77_INT minmn = (m < n ? m : n);
-      F77_INT maxmn = m > n ? m : n;
+      F77_INT maxmn = (m > n ? m : n);
       rcon = -1.0;
 
       if (m != n)
@@ -2687,7 +2687,7 @@
   else
     {
       volatile F77_INT minmn = (m < n ? m : n);
-      F77_INT maxmn = m > n ? m : n;
+      F77_INT maxmn = (m > n ? m : n);
       rcon = -1.0;
 
       if (m != n)
@@ -3086,8 +3086,8 @@
 
               if (! octave::math::isnan (tmp_min))
                 {
-                  abs_min = real_only ? tmp_min.real ()
-                                      : std::abs (tmp_min);
+                  abs_min = (real_only ? tmp_min.real ()
+                                       : std::abs (tmp_min));
                   break;
                 }
             }
@@ -3099,7 +3099,7 @@
               if (octave::math::isnan (tmp))
                 continue;
 
-              float abs_tmp = real_only ? tmp.real () : std::abs (tmp);
+              float abs_tmp = (real_only ? tmp.real () : std::abs (tmp));
 
               if (abs_tmp < abs_min)
                 {
@@ -3161,8 +3161,8 @@
 
               if (! octave::math::isnan (tmp_max))
                 {
-                  abs_max = real_only ? tmp_max.real ()
-                                      : std::abs (tmp_max);
+                  abs_max = (real_only ? tmp_max.real ()
+                                       : std::abs (tmp_max));
                   break;
                 }
             }
@@ -3174,7 +3174,7 @@
               if (octave::math::isnan (tmp))
                 continue;
 
-              float abs_tmp = real_only ? tmp.real () : std::abs (tmp);
+              float abs_tmp = (real_only ? tmp.real () : std::abs (tmp));
 
               if (abs_tmp > abs_max)
                 {
@@ -3236,8 +3236,8 @@
 
               if (! octave::math::isnan (tmp_min))
                 {
-                  abs_min = real_only ? tmp_min.real ()
-                                      : std::abs (tmp_min);
+                  abs_min = (real_only ? tmp_min.real ()
+                                       : std::abs (tmp_min));
                   break;
                 }
             }
@@ -3249,7 +3249,7 @@
               if (octave::math::isnan (tmp))
                 continue;
 
-              float abs_tmp = real_only ? tmp.real () : std::abs (tmp);
+              float abs_tmp = (real_only ? tmp.real () : std::abs (tmp));
 
               if (abs_tmp < abs_min)
                 {
@@ -3311,8 +3311,8 @@
 
               if (! octave::math::isnan (tmp_max))
                 {
-                  abs_max = real_only ? tmp_max.real ()
-                                      : std::abs (tmp_max);
+                  abs_max = (real_only ? tmp_max.real ()
+                                       : std::abs (tmp_max));
                   break;
                 }
             }
@@ -3324,7 +3324,7 @@
               if (octave::math::isnan (tmp))
                 continue;
 
-              float abs_tmp = real_only ? tmp.real () : std::abs (tmp);
+              float abs_tmp = (real_only ? tmp.real () : std::abs (tmp));
 
               if (abs_tmp > abs_max)
                 {
--- a/liboctave/array/fCNDArray.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/fCNDArray.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -303,8 +303,8 @@
       FloatComplex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
-      howmany = (stride == 1 ? howmany :
-                 (howmany > stride ? stride : howmany));
+      howmany = (stride == 1 ? howmany
+                             : (howmany > stride ? stride : howmany));
       octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride);
       octave_idx_type dist = (stride == 1 ? npts : 1);
 
@@ -351,8 +351,8 @@
       FloatComplex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
-      howmany = (stride == 1 ? howmany :
-                 (howmany > stride ? stride : howmany));
+      howmany = (stride == 1 ? howmany
+                             : (howmany > stride ? stride : howmany));
       octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride);
       octave_idx_type dist = (stride == 1 ? npts : 1);
 
@@ -399,8 +399,8 @@
       FloatComplex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
-      howmany = (stride == 1 ? howmany :
-                 (howmany > stride ? stride : howmany));
+      howmany = (stride == 1 ? howmany
+                             : (howmany > stride ? stride : howmany));
       octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride);
       octave_idx_type dist = (stride == 1 ? npts : 1);
 
@@ -446,8 +446,8 @@
       FloatComplex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
-      howmany = (stride == 1 ? howmany :
-                 (howmany > stride ? stride : howmany));
+      howmany = (stride == 1 ? howmany
+                             : (howmany > stride ? stride : howmany));
       octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride);
       octave_idx_type dist = (stride == 1 ? npts : 1);
 
--- a/liboctave/array/fDiagMatrix.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/fDiagMatrix.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -292,7 +292,7 @@
   FloatDiagMatrix c (a_nr, b_nc);
 
   octave_idx_type len = c.length ();
-  octave_idx_type lenm = len < a_nc ? len : a_nc;
+  octave_idx_type lenm = (len < a_nc ? len : a_nc);
 
   for (octave_idx_type i = 0; i < lenm; i++)
     c.dgxelem (i) = a.dgelem (i) * b.dgelem (i);
--- a/liboctave/array/fMatrix.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/fMatrix.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -708,7 +708,7 @@
 
   if (nr == 1 || nc == 1)
     {
-      npts = nr > nc ? nr : nc;
+      npts = (nr > nc ? nr : nc);
       nsamples = 1;
     }
   else
@@ -737,7 +737,7 @@
 
   if (nr == 1 || nc == 1)
     {
-      npts = nr > nc ? nr : nc;
+      npts = (nr > nc ? nr : nc);
       nsamples = 1;
     }
   else
@@ -885,7 +885,7 @@
 
   if (nr == 1 || nc == 1)
     {
-      npts = nr > nc ? nr : nc;
+      npts = (nr > nc ? nr : nc);
       nsamples = 1;
     }
   else
@@ -952,7 +952,7 @@
 
   if (nr == 1 || nc == 1)
     {
-      npts = nr > nc ? nr : nc;
+      npts = (nr > nc ? nr : nc);
       nsamples = 1;
     }
   else
@@ -2120,7 +2120,7 @@
   else
     {
       volatile F77_INT minmn = (m < n ? m : n);
-      F77_INT maxmn = m > n ? m : n;
+      F77_INT maxmn = (m > n ? m : n);
       rcon = -1.0;
       if (m != n)
         {
@@ -2337,7 +2337,7 @@
   else
     {
       volatile F77_INT minmn = (m < n ? m : n);
-      F77_INT maxmn = m > n ? m : n;
+      F77_INT maxmn = (m > n ? m : n);
       rcon = -1.0;
 
       if (m != n)
@@ -2628,7 +2628,7 @@
             }
 
           result.elem (i) = tmp_min;
-          idx_arg.elem (i) = octave::math::isnan (tmp_min) ? 0 : idx_j;
+          idx_arg.elem (i) = (octave::math::isnan (tmp_min) ? 0 : idx_j);
         }
     }
 
@@ -2683,7 +2683,7 @@
             }
 
           result.elem (i) = tmp_max;
-          idx_arg.elem (i) = octave::math::isnan (tmp_max) ? 0 : idx_j;
+          idx_arg.elem (i) = (octave::math::isnan (tmp_max) ? 0 : idx_j);
         }
     }
 
@@ -2738,7 +2738,7 @@
             }
 
           result.elem (j) = tmp_min;
-          idx_arg.elem (j) = octave::math::isnan (tmp_min) ? 0 : idx_i;
+          idx_arg.elem (j) = (octave::math::isnan (tmp_min) ? 0 : idx_i);
         }
     }
 
@@ -2793,7 +2793,7 @@
             }
 
           result.elem (j) = tmp_max;
-          idx_arg.elem (j) = octave::math::isnan (tmp_max) ? 0 : idx_i;
+          idx_arg.elem (j) = (octave::math::isnan (tmp_max) ? 0 : idx_i);
         }
     }
 
--- a/liboctave/array/fNDArray.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/fNDArray.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -302,8 +302,8 @@
       FloatComplex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
-      howmany = (stride == 1 ? howmany :
-                 (howmany > stride ? stride : howmany));
+      howmany = (stride == 1 ? howmany
+                             : (howmany > stride ? stride : howmany));
       octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride);
       octave_idx_type dist = (stride == 1 ? npts : 1);
 
@@ -350,8 +350,8 @@
       FloatComplex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
-      howmany = (stride == 1 ? howmany :
-                 (howmany > stride ? stride : howmany));
+      howmany = (stride == 1 ? howmany
+                             : (howmany > stride ? stride : howmany));
       octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride);
       octave_idx_type dist = (stride == 1 ? npts : 1);
 
@@ -398,8 +398,8 @@
       FloatComplex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
-      howmany = (stride == 1 ? howmany :
-                 (howmany > stride ? stride : howmany));
+      howmany = (stride == 1 ? howmany
+                             : (howmany > stride ? stride : howmany));
       octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride);
       octave_idx_type dist = (stride == 1 ? npts : 1);
 
@@ -445,8 +445,8 @@
       FloatComplex *prow = row.fortran_vec ();
 
       octave_idx_type howmany = numel () / npts;
-      howmany = (stride == 1 ? howmany :
-                 (howmany > stride ? stride : howmany));
+      howmany = (stride == 1 ? howmany
+                             : (howmany > stride ? stride : howmany));
       octave_idx_type nloop = (stride == 1 ? 1 : numel () / npts / stride);
       octave_idx_type dist = (stride == 1 ? npts : 1);
 
--- a/liboctave/array/idx-vector.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/idx-vector.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -1213,7 +1213,7 @@
         if (data[i])
           idata[j++] = i;
 
-      ext = len > 0 ? idata[len - 1] + 1 : 0;
+      ext = (len > 0 ? idata[len - 1] + 1 : 0);
 
       return new idx_vector_rep (idata, len, ext, r->orig_dimensions (),
                                  DIRECT);
--- a/liboctave/array/idx-vector.h	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/array/idx-vector.h	Thu Apr 27 17:33:10 2017 -0700
@@ -941,7 +941,7 @@
       case class_scalar:
         {
           idx_scalar_rep *r = dynamic_cast<idx_scalar_rep *> (rep);
-          ret = body (r->get_data ()) ? 1 : 0;
+          ret = (body (r->get_data ()) ? 1 : 0);
         }
         break;
 
--- a/liboctave/external/Faddeeva/Faddeeva.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/external/Faddeeva/Faddeeva.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -415,8 +415,8 @@
 #else
   if (x*x > 750) // underflow
     return (x >= 0 ? 0.0 : 2.0);
-  return x >= 0 ? exp(-x*x) * FADDEEVA_RE(erfcx)(x) 
-    : 2. - exp(-x*x) * FADDEEVA_RE(erfcx)(-x);
+  return (x >= 0 ? exp(-x*x) * FADDEEVA_RE(erfcx)(x) 
+                 : 2. - exp(-x*x) * FADDEEVA_RE(erfcx)(-x));
 #endif
 }
 
@@ -719,7 +719,7 @@
        that the estimated nu be >= minimum nu to attain machine precision.
        I also separate the regions where nu == 2 and nu == 1. */
     const double ispi = 0.56418958354775628694807945156; // 1 / sqrt(pi)
-    double xs = y < 0 ? -creal(z) : creal(z); // compute for -z if y < 0
+    double xs = (y < 0 ? -creal(z) : creal(z)); // compute for -z if y < 0
     if (x + ya > 4000) { // nu <= 2
       if (x + ya > 1e7) { // nu == 1, w(z) = i/sqrt(pi) / z
         // scale to avoid overflow
@@ -770,7 +770,7 @@
 #else // !USE_CONTINUED_FRACTION
   if (x + ya > 1e7) { // w(z) = i/sqrt(pi) / z, to machine precision
     const double ispi = 0.56418958354775628694807945156; // 1 / sqrt(pi)
-    double xs = y < 0 ? -creal(z) : creal(z); // compute for -z if y < 0
+    double xs = (y < 0 ? -creal(z) : creal(z)); // compute for -z if y < 0
     // scale to avoid overflow
     if (x > ya) {
       double yax = ya / xs; 
--- a/liboctave/numeric/DASPK.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/numeric/DASPK.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -209,7 +209,7 @@
           return retval;
         }
 
-      info(4) = user_jac ? 1 : 0;
+      info(4) = (user_jac ? 1 : 0);
 
       DAEFunc::reset = false;
 
@@ -364,7 +364,7 @@
                       ("daspk: invalid value for eiq: %d", eiq);
 
                   for (F77_INT i = 0; i < n; i++)
-                    iwork(lid+i) = av(i) ? -1 : 1;
+                    iwork(lid+i) = (av(i) ? -1 : 1);
                 }
               else
                 {
@@ -409,7 +409,7 @@
                   ("daspk: invalid value for eiq: %d", eiq);
 
               for (F77_INT i = 0; i < n; i++)
-                iwork(lid+i) = av(i) ? -1 : 1;
+                iwork(lid+i) = (av(i) ? -1 : 1);
             }
         }
 
--- a/liboctave/numeric/DASRT.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/numeric/DASRT.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -243,7 +243,7 @@
           return;
         }
 
-      info(4) = user_jsub ? 1 : 0;
+      info(4) = (user_jsub ? 1 : 0);
 
       DAEFunc::reset = false;
 
--- a/liboctave/numeric/DASSL.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/numeric/DASSL.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -191,7 +191,7 @@
           return retval;
         }
 
-      info(4) = user_jac ? 1 : 0;
+      info(4) = (user_jac ? 1 : 0);
 
       DAEFunc::reset = false;
 
@@ -243,10 +243,10 @@
         }
 
       F77_INT enc = octave::to_f77_int (enforce_nonnegativity_constraints ());
-      info(9) = enc ? 1 : 0;
+      info(9) = (enc ? 1 : 0);
 
       F77_INT ccic = octave::to_f77_int (compute_consistent_initial_condition ());
-      info(10) = ccic ? 1 : 0;
+      info(10) = (ccic ? 1 : 0);
 
       abs_tol = absolute_tolerance ();
       rel_tol = relative_tolerance ();
--- a/liboctave/numeric/EIG.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/numeric/EIG.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -57,11 +57,11 @@
   Array<double> wi (dim_vector (n, 1));
   double *pwi = wi.fortran_vec ();
 
-  F77_INT tnvr = calc_rev ? n : 0;
+  F77_INT tnvr = (calc_rev ? n : 0);
   Matrix vr (tnvr, tnvr);
   double *pvr = vr.fortran_vec ();
 
-  F77_INT tnvl = calc_lev ? n : 0;
+  F77_INT tnvl = (calc_lev ? n : 0);
   Matrix vl (tnvl, tnvl);
   double *pvl = vl.fortran_vec ();
 
@@ -124,9 +124,9 @@
     (*current_liboctave_error_handler) ("dgeevx failed to converge");
 
   lambda.resize (n);
-  F77_INT nvr = calc_rev ? n : 0;
+  F77_INT nvr = (calc_rev ? n : 0);
   v.resize (nvr, nvr);
-  F77_INT nvl = calc_lev ? n : 0;
+  F77_INT nvl = (calc_lev ? n : 0);
   w.resize (nvl, nvl);
 
   for (F77_INT j = 0; j < n; j++)
@@ -216,8 +216,8 @@
     (*current_liboctave_error_handler) ("dsyev failed to converge");
 
   lambda = ComplexColumnVector (wr);
-  v = calc_rev ? ComplexMatrix (atmp) : ComplexMatrix ();
-  w = calc_lev ? ComplexMatrix (atmp) : ComplexMatrix ();
+  v = (calc_rev ? ComplexMatrix (atmp) : ComplexMatrix ());
+  w = (calc_lev ? ComplexMatrix (atmp) : ComplexMatrix ());
 
   return info;
 }
@@ -246,11 +246,11 @@
   ComplexColumnVector wr (n);
   Complex *pw = wr.fortran_vec ();
 
-  F77_INT nvr = calc_rev ? n : 0;
+  F77_INT nvr = (calc_rev ? n : 0);
   ComplexMatrix vrtmp (nvr, nvr);
   Complex *pvr = vrtmp.fortran_vec ();
 
-  F77_INT nvl = calc_lev ? n : 0;
+  F77_INT nvl = (calc_lev ? n : 0);
   ComplexMatrix vltmp (nvl, nvl);
   Complex *pvl = vltmp.fortran_vec ();
 
@@ -376,8 +376,8 @@
     (*current_liboctave_error_handler) ("zheev failed to converge");
 
   lambda = ComplexColumnVector (wr);
-  v = calc_rev ? ComplexMatrix (atmp) : ComplexMatrix ();
-  w = calc_lev ? ComplexMatrix (atmp) : ComplexMatrix ();
+  v = (calc_rev ? ComplexMatrix (atmp) : ComplexMatrix ());
+  w = (calc_lev ? ComplexMatrix (atmp) : ComplexMatrix ());
 
   return info;
 }
@@ -433,11 +433,11 @@
   Array<double> beta (dim_vector (n, 1));
   double *pbeta = beta.fortran_vec ();
 
-  F77_INT tnvr = calc_rev ? n : 0;
+  F77_INT tnvr = (calc_rev ? n : 0);
   Matrix vr (tnvr, tnvr);
   double *pvr = vr.fortran_vec ();
 
-  F77_INT tnvl = calc_lev ? n : 0;
+  F77_INT tnvl = (calc_lev ? n : 0);
   Matrix vl (tnvl, tnvl);
   double *pvl = vl.fortran_vec ();
 
@@ -476,10 +476,10 @@
     (*current_liboctave_error_handler) ("dggev failed to converge");
 
   lambda.resize (n);
-  F77_INT nvr = calc_rev ? n : 0;
+  F77_INT nvr = (calc_rev ? n : 0);
   v.resize (nvr, nvr);
 
-  F77_INT nvl = calc_lev ? n : 0;
+  F77_INT nvl = (calc_lev ? n : 0);
   w.resize (nvl, nvl);
 
   for (F77_INT j = 0; j < n; j++)
@@ -583,8 +583,8 @@
     (*current_liboctave_error_handler) ("dsygv failed to converge");
 
   lambda = ComplexColumnVector (wr);
-  v = calc_rev ? ComplexMatrix (atmp) : ComplexMatrix ();
-  w = calc_lev ? ComplexMatrix (atmp) : ComplexMatrix ();
+  v = (calc_rev ? ComplexMatrix (atmp) : ComplexMatrix ());
+  w = (calc_lev ? ComplexMatrix (atmp) : ComplexMatrix ());
 
   return info;
 }
@@ -637,11 +637,11 @@
   ComplexColumnVector beta (n);
   Complex *pbeta = beta.fortran_vec ();
 
-  F77_INT nvr = calc_rev ? n : 0;
+  F77_INT nvr = (calc_rev ? n : 0);
   ComplexMatrix vrtmp (nvr, nvr);
   Complex *pvr = vrtmp.fortran_vec ();
 
-  F77_INT nvl = calc_lev ? n : 0;
+  F77_INT nvl = (calc_lev ? n : 0);
   ComplexMatrix vltmp (nvl, nvl);
   Complex *pvl = vltmp.fortran_vec ();
 
@@ -765,8 +765,8 @@
     (*current_liboctave_error_handler) ("zhegv failed to converge");
 
   lambda = ComplexColumnVector (wr);
-  v = calc_rev ? ComplexMatrix (atmp) : ComplexMatrix ();
-  w = calc_lev ? ComplexMatrix (atmp) : ComplexMatrix ();
+  v = (calc_rev ? ComplexMatrix (atmp) : ComplexMatrix ());
+  w = (calc_lev ? ComplexMatrix (atmp) : ComplexMatrix ());
 
   return info;
 }
--- a/liboctave/numeric/fEIG.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/numeric/fEIG.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -58,11 +58,11 @@
   Array<float> wi (dim_vector (n, 1));
   float *pwi = wi.fortran_vec ();
 
-  volatile F77_INT nvr = calc_rev ? n : 0;
+  volatile F77_INT nvr = (calc_rev ? n : 0);
   FloatMatrix vr (nvr, nvr);
   float *pvr = vr.fortran_vec ();
 
-  volatile F77_INT nvl = calc_lev ? n : 0;
+  volatile F77_INT nvl = (calc_lev ? n : 0);
   FloatMatrix vl (nvl, nvl);
   float *pvl = vl.fortran_vec ();
 
@@ -214,8 +214,8 @@
     (*current_liboctave_error_handler) ("ssyev failed to converge");
 
   lambda = FloatComplexColumnVector (wr);
-  v = calc_rev ? FloatComplexMatrix (atmp) : FloatComplexMatrix ();
-  w = calc_lev ? FloatComplexMatrix (atmp) : FloatComplexMatrix ();
+  v = (calc_rev ? FloatComplexMatrix (atmp) : FloatComplexMatrix ());
+  w = (calc_lev ? FloatComplexMatrix (atmp) : FloatComplexMatrix ());
 
   return info;
 }
@@ -245,11 +245,11 @@
   FloatComplexColumnVector wr (n);
   FloatComplex *pw = wr.fortran_vec ();
 
-  F77_INT nvr = calc_rev ? n : 0;
+  F77_INT nvr = (calc_rev ? n : 0);
   FloatComplexMatrix vrtmp (nvr, nvr);
   FloatComplex *pvr = vrtmp.fortran_vec ();
 
-  F77_INT nvl = calc_lev ? n : 0;
+  F77_INT nvl = (calc_lev ? n : 0);
   FloatComplexMatrix vltmp (nvl, nvl);
   FloatComplex *pvl = vltmp.fortran_vec ();
 
@@ -374,8 +374,8 @@
     (*current_liboctave_error_handler) ("cheev failed to converge");
 
   lambda = FloatComplexColumnVector (wr);
-  v = calc_rev ? FloatComplexMatrix (atmp) : FloatComplexMatrix ();
-  w = calc_lev ? FloatComplexMatrix (atmp) : FloatComplexMatrix ();
+  v = (calc_rev ? FloatComplexMatrix (atmp) : FloatComplexMatrix ());
+  w = (calc_lev ? FloatComplexMatrix (atmp) : FloatComplexMatrix ());
 
   return info;
 }
@@ -430,11 +430,11 @@
   Array<float> beta (dim_vector (n, 1));
   float *pbeta = beta.fortran_vec ();
 
-  volatile F77_INT nvr = calc_rev ? n : 0;
+  volatile F77_INT nvr = (calc_rev ? n : 0);
   FloatMatrix vr (nvr, nvr);
   float *pvr = vr.fortran_vec ();
 
-  volatile F77_INT nvl = calc_lev ? n : 0;
+  volatile F77_INT nvl = (calc_lev ? n : 0);
   FloatMatrix vl (nvl, nvl);
   float *pvl = vl.fortran_vec ();
 
@@ -579,8 +579,8 @@
     (*current_liboctave_error_handler) ("ssygv failed to converge");
 
   lambda = FloatComplexColumnVector (wr);
-  v = calc_rev ? FloatComplexMatrix (atmp) : FloatComplexMatrix ();
-  w = calc_lev ? FloatComplexMatrix (atmp) : FloatComplexMatrix ();
+  v = (calc_rev ? FloatComplexMatrix (atmp) : FloatComplexMatrix ());
+  w = (calc_lev ? FloatComplexMatrix (atmp) : FloatComplexMatrix ());
 
   return info;
 }
@@ -633,11 +633,11 @@
   FloatComplexColumnVector beta (n);
   FloatComplex *pbeta = beta.fortran_vec ();
 
-  F77_INT nvr = calc_rev ? n : 0;
+  F77_INT nvr = (calc_rev ? n : 0);
   FloatComplexMatrix vrtmp (nvr, nvr);
   FloatComplex *pvr = vrtmp.fortran_vec ();
 
-  F77_INT nvl = calc_lev ? n : 0;
+  F77_INT nvl = (calc_lev ? n : 0);
   FloatComplexMatrix vltmp (nvl, nvl);
   FloatComplex *pvl = vltmp.fortran_vec ();
 
@@ -758,8 +758,8 @@
     (*current_liboctave_error_handler) ("zhegv failed to converge");
 
   lambda = FloatComplexColumnVector (wr);
-  v = calc_rev ? FloatComplexMatrix (atmp) : FloatComplexMatrix ();
-  w = calc_lev ? FloatComplexMatrix (atmp) : FloatComplexMatrix ();
+  v = (calc_rev ? FloatComplexMatrix (atmp) : FloatComplexMatrix ());
+  w = (calc_lev ? FloatComplexMatrix (atmp) : FloatComplexMatrix ());
 
   return info;
 }
--- a/liboctave/numeric/gsvd.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/numeric/gsvd.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -270,7 +270,7 @@
       P *q = right_sm.fortran_vec ();
 
       F77_INT lwork = 3*n;
-      lwork = lwork > m ? lwork : m;
+      lwork = (lwork > m ? lwork : m);
       lwork = (lwork > p ? lwork : p) + n;
 
       T work (lwork, 1);
--- a/liboctave/numeric/lo-specfun.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/numeric/lo-specfun.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -2006,7 +2006,7 @@
       double zr = z.real ();
       double zi = z.imag ();
 
-      F77_INT id = deriv ? 1 : 0;
+      F77_INT id = (deriv ? 1 : 0);
       F77_INT nz, t_ierr;
 
       F77_FUNC (zairy, ZAIRY) (zr, zi, id, 2, ar, ai, nz, t_ierr);
@@ -2041,7 +2041,7 @@
       double zr = z.real ();
       double zi = z.imag ();
 
-      F77_INT id = deriv ? 1 : 0;
+      F77_INT id = (deriv ? 1 : 0);
       F77_INT t_ierr;
 
       F77_FUNC (zbiry, ZBIRY) (zr, zi, id, 2, ar, ai, t_ierr);
@@ -2141,7 +2141,7 @@
     {
       FloatComplex a;
 
-      F77_INT id = deriv ? 1 : 0;
+      F77_INT id = (deriv ? 1 : 0);
       F77_INT nz, t_ierr;
 
       F77_FUNC (cairy, CAIRY) (F77_CONST_CMPLX_ARG (&z), id, 2,
@@ -2177,7 +2177,7 @@
     {
       FloatComplex a;
 
-      F77_INT id = deriv ? 1 : 0;
+      F77_INT id = (deriv ? 1 : 0);
       F77_INT t_ierr;
 
       F77_FUNC (cbiry, CBIRY) (F77_CONST_CMPLX_ARG (&z), id, 2,
--- a/liboctave/numeric/oct-rand.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/numeric/oct-rand.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -101,7 +101,7 @@
 {
   assert (hi > lo && lo >= 0 && hi > lo);
 
-  i = i > 0 ? i : -i;
+  i = (i > 0 ? i : -i);
 
   if (i < lo)
     i = lo;
@@ -158,7 +158,7 @@
 
   int old_dist = current_distribution;
 
-  int new_dist = d.empty () ? current_distribution : get_dist_id (d);
+  int new_dist = (d.empty () ? current_distribution : get_dist_id (d));
 
   ColumnVector saved_state;
 
@@ -180,7 +180,7 @@
 
   int old_dist = current_distribution;
 
-  int new_dist = d.empty () ? current_distribution : get_dist_id (d);
+  int new_dist = (d.empty () ? current_distribution : get_dist_id (d));
 
   ColumnVector saved_state;
 
@@ -657,7 +657,7 @@
 octave_rand::set_internal_state (const ColumnVector& s)
 {
   octave_idx_type len = s.numel ();
-  octave_idx_type n = len < MT_N + 1 ? len : MT_N + 1;
+  octave_idx_type n = (len < MT_N + 1 ? len : MT_N + 1);
 
   OCTAVE_LOCAL_BUFFER (uint32_t, tmp, MT_N + 1);
 
--- a/liboctave/numeric/qr.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/numeric/qr.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -387,7 +387,7 @@
         {
           for (F77_INT j = 0; j < min_mn; j++)
             {
-              F77_INT limit = j < min_mn - 1 ? j : min_mn - 1;
+              F77_INT limit = (j < min_mn - 1 ? j : min_mn - 1);
               for (F77_INT i = limit + 1; i < m; i++)
                 afact.elem (i, j) *= tau[j];
             }
@@ -401,7 +401,7 @@
             {
               // afact will become q.
               q = afact;
-              F77_INT k = qr_type == qr<Matrix>::economy ? n : m;
+              F77_INT k = (qr_type == qr<Matrix>::economy ? n : m);
               r = Matrix (k, n);
               for (F77_INT j = 0; j < n; j++)
                 {
@@ -451,7 +451,7 @@
       F77_INT m = octave::to_f77_int (a.rows ());
       F77_INT n = octave::to_f77_int (a.cols ());
 
-      F77_INT min_mn = m < n ? m : n;
+      F77_INT min_mn = (m < n ? m : n);
       OCTAVE_LOCAL_BUFFER (double, tau, min_mn);
 
       F77_INT info = 0;
@@ -687,7 +687,7 @@
             {
               F77_INT ii = i;
               F77_INT js_elt = octave::to_f77_int (js(ii));
-              F77_XFCN (dqrdec, DQRDEC, (m, n - ii, k == m ? k : k - ii,
+              F77_XFCN (dqrdec, DQRDEC, (m, n - ii, (k == m ? k : k - ii),
                                          q.fortran_vec (), ldq,
                                          r.fortran_vec (), ldr,
                                          js_elt + 1, w));
@@ -801,7 +801,7 @@
         {
           for (F77_INT j = 0; j < min_mn; j++)
             {
-              F77_INT limit = j < min_mn - 1 ? j : min_mn - 1;
+              F77_INT limit = (j < min_mn - 1 ? j : min_mn - 1);
               for (F77_INT i = limit + 1; i < m; i++)
                 afact.elem (i, j) *= tau[j];
             }
@@ -815,7 +815,7 @@
             {
               // afact will become q.
               q = afact;
-              F77_INT k = qr_type == qr<FloatMatrix>::economy ? n : m;
+              F77_INT k = (qr_type == qr<FloatMatrix>::economy ? n : m);
               r = FloatMatrix (k, n);
               for (F77_INT j = 0; j < n; j++)
                 {
@@ -865,7 +865,7 @@
       F77_INT m = octave::to_f77_int (a.rows ());
       F77_INT n = octave::to_f77_int (a.cols ());
 
-      F77_INT min_mn = m < n ? m : n;
+      F77_INT min_mn = (m < n ? m : n);
       OCTAVE_LOCAL_BUFFER (float, tau, min_mn);
 
       F77_INT info = 0;
@@ -1103,7 +1103,7 @@
             {
               F77_INT ii = i;
               F77_INT js_elt = octave::to_f77_int (js(ii));
-              F77_XFCN (sqrdec, SQRDEC, (m, n - ii, k == m ? k : k - ii,
+              F77_XFCN (sqrdec, SQRDEC, (m, n - ii, (k == m ? k : k - ii),
                                          q.fortran_vec (), ldq,
                                          r.fortran_vec (), ldr,
                                          js_elt + 1, w));
@@ -1219,7 +1219,7 @@
         {
           for (F77_INT j = 0; j < min_mn; j++)
             {
-              F77_INT limit = j < min_mn - 1 ? j : min_mn - 1;
+              F77_INT limit = (j < min_mn - 1 ? j : min_mn - 1);
               for (F77_INT i = limit + 1; i < m; i++)
                 afact.elem (i, j) *= tau[j];
             }
@@ -1233,7 +1233,7 @@
             {
               // afact will become q.
               q = afact;
-              F77_INT k = qr_type == qr<ComplexMatrix>::economy ? n : m;
+              F77_INT k = (qr_type == qr<ComplexMatrix>::economy ? n : m);
               r = ComplexMatrix (k, n);
               for (F77_INT j = 0; j < n; j++)
                 {
@@ -1289,7 +1289,7 @@
       F77_INT m = octave::to_f77_int (a.rows ());
       F77_INT n = octave::to_f77_int (a.cols ());
 
-      F77_INT min_mn = m < n ? m : n;
+      F77_INT min_mn = (m < n ? m : n);
       OCTAVE_LOCAL_BUFFER (Complex, tau, min_mn);
 
       F77_INT info = 0;
@@ -1544,7 +1544,7 @@
             {
               F77_INT ii = i;
               F77_INT js_elt = octave::to_f77_int (js(ii));
-              F77_XFCN (zqrdec, ZQRDEC, (m, n - ii, k == m ? k : k - ii,
+              F77_XFCN (zqrdec, ZQRDEC, (m, n - ii, (k == m ? k : k - ii),
                                          F77_DBLE_CMPLX_ARG (q.fortran_vec ()),
                                          ldq,
                                          F77_DBLE_CMPLX_ARG (r.fortran_vec ()),
@@ -1665,7 +1665,7 @@
         {
           for (F77_INT j = 0; j < min_mn; j++)
             {
-              F77_INT limit = j < min_mn - 1 ? j : min_mn - 1;
+              F77_INT limit = (j < min_mn - 1 ? j : min_mn - 1);
               for (F77_INT i = limit + 1; i < m; i++)
                 afact.elem (i, j) *= tau[j];
             }
@@ -1679,7 +1679,7 @@
             {
               // afact will become q.
               q = afact;
-              F77_INT k = qr_type == qr<FloatComplexMatrix>::economy ? n : m;
+              F77_INT k = (qr_type == qr<FloatComplexMatrix>::economy ? n : m);
               r = FloatComplexMatrix (k, n);
               for (F77_INT j = 0; j < n; j++)
                 {
@@ -1733,7 +1733,7 @@
       F77_INT m = octave::to_f77_int (a.rows ());
       F77_INT n = octave::to_f77_int (a.cols ());
 
-      F77_INT min_mn = m < n ? m : n;
+      F77_INT min_mn = (m < n ? m : n);
       OCTAVE_LOCAL_BUFFER (FloatComplex, tau, min_mn);
 
       F77_INT info = 0;
@@ -1983,7 +1983,7 @@
             {
               F77_INT ii = i;
               F77_INT js_elt = octave::to_f77_int (js(ii));
-              F77_XFCN (cqrdec, CQRDEC, (m, n - ii, k == m ? k : k - ii,
+              F77_XFCN (cqrdec, CQRDEC, (m, n - ii, (k == m ? k : k - ii),
                                          F77_CMPLX_ARG (q.fortran_vec ()), ldq,
                                          F77_CMPLX_ARG (r.fortran_vec ()), ldr,
                                          js_elt + 1, rw));
--- a/liboctave/numeric/qrp.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/numeric/qrp.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -53,7 +53,7 @@
       F77_INT m = octave::to_f77_int (a.rows ());
       F77_INT n = octave::to_f77_int (a.cols ());
 
-      F77_INT min_mn = m < n ? m : n;
+      F77_INT min_mn = (m < n ? m : n);
       OCTAVE_LOCAL_BUFFER (double, tau, min_mn);
 
       F77_INT info = 0;
@@ -121,7 +121,7 @@
       F77_INT m = octave::to_f77_int (a.rows ());
       F77_INT n = octave::to_f77_int (a.cols ());
 
-      F77_INT min_mn = m < n ? m : n;
+      F77_INT min_mn = (m < n ? m : n);
       OCTAVE_LOCAL_BUFFER (float, tau, min_mn);
 
       F77_INT info = 0;
@@ -189,7 +189,7 @@
       F77_INT m = octave::to_f77_int (a.rows ());
       F77_INT n = octave::to_f77_int (a.cols ());
 
-      F77_INT min_mn = m < n ? m : n;
+      F77_INT min_mn = (m < n ? m : n);
       OCTAVE_LOCAL_BUFFER (Complex, tau, min_mn);
 
       F77_INT info = 0;
@@ -265,7 +265,7 @@
       F77_INT m = octave::to_f77_int (a.rows ());
       F77_INT n = octave::to_f77_int (a.cols ());
 
-      F77_INT min_mn = m < n ? m : n;
+      F77_INT min_mn = (m < n ? m : n);
       OCTAVE_LOCAL_BUFFER (FloatComplex, tau, min_mn);
 
       F77_INT info = 0;
--- a/liboctave/numeric/randgamma.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/numeric/randgamma.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -96,7 +96,7 @@
 {
   octave_idx_type i;
   /* If a < 1, start by generating gamma (1+a) */
-  const double d =  (a < 1. ? 1.+a : a) - 1./3.;
+  const double d = (a < 1. ? 1.+a : a) - 1./3.;
   const double c = 1./sqrt (9.*d);
 
   /* Handle invalid cases */
@@ -151,7 +151,7 @@
 {
   octave_idx_type i;
   /* If a < 1, start by generating gamma(1+a) */
-  const float d =  (a < 1. ? 1.+a : a) - 1./3.;
+  const float d = (a < 1. ? 1.+a : a) - 1./3.;
   const float c = 1./sqrt (9.*d);
 
   /* Handle invalid cases */
--- a/liboctave/numeric/schur.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/numeric/schur.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -121,7 +121,7 @@
       else
         jobvs = 'N';
 
-      char ord_char = ord.empty () ? 'U' : ord[0];
+      char ord_char = (ord.empty () ? 'U' : ord[0]);
 
       if (ord_char == 'A' || ord_char == 'D' || ord_char == 'a' || ord_char == 'd')
         sort = 'S';
@@ -208,7 +208,7 @@
       else
         jobvs = 'N';
 
-      char ord_char = ord.empty () ? 'U' : ord[0];
+      char ord_char = (ord.empty () ? 'U' : ord[0]);
 
       if (ord_char == 'A' || ord_char == 'D' || ord_char == 'a' || ord_char == 'd')
         sort = 'S';
@@ -295,7 +295,7 @@
       else
         jobvs = 'N';
 
-      char ord_char = ord.empty () ? 'U' : ord[0];
+      char ord_char = (ord.empty () ? 'U' : ord[0]);
 
       if (ord_char == 'A' || ord_char == 'D' || ord_char == 'a' || ord_char == 'd')
         sort = 'S';
@@ -403,7 +403,7 @@
       else
         jobvs = 'N';
 
-      char ord_char = ord.empty () ? 'U' : ord[0];
+      char ord_char = (ord.empty () ? 'U' : ord[0]);
 
       if (ord_char == 'A' || ord_char == 'D' || ord_char == 'a' || ord_char == 'd')
         sort = 'S';
--- a/liboctave/numeric/svd.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/numeric/svd.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -316,7 +316,7 @@
       T atmp = a;
       P *tmp_data = atmp.fortran_vec ();
 
-      F77_INT min_mn = m < n ? m : n;
+      F77_INT min_mn = (m < n ? m : n);
 
       char jobu = 'A';
       char jobv = 'A';
--- a/liboctave/operators/Sparse-diag-op-defs.h	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/operators/Sparse-diag-op-defs.h	Thu Apr 27 17:33:10 2017 -0700
@@ -77,7 +77,7 @@
   if (nr != a_nc)
     octave::err_nonconformant ("operator *", a_nr, a_nc, nr, nc);
 
-  const octave_idx_type mnc = nc < a_nc ? nc: a_nc;
+  const octave_idx_type mnc = (nc < a_nc ? nc: a_nc);
   RT r (a_nr, nc, a.cidx (mnc));
 
   for (octave_idx_type j = 0; j < mnc; ++j)
--- a/liboctave/operators/mx-inlines.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/operators/mx-inlines.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -391,7 +391,7 @@
       std::memcpy (r, x, n * sizeof (T));                       \
     else                                                        \
       for (size_t i = 0; i < n; i++)                            \
-        r[i] = (x[i] OP y) ? x[i] : y;                          \
+        r[i] = (x[i] OP y ? x[i] : y);                          \
   }                                                             \
   template <>                                                   \
   inline void F<T> (size_t n, T *r, T x, const T *y) throw ()   \
@@ -400,7 +400,7 @@
       std::memcpy (r, y, n * sizeof (T));                       \
     else                                                        \
       for (size_t i = 0; i < n; i++)                            \
-        r[i] = (y[i] OP x) ? y[i] : x;                          \
+        r[i] = (y[i] OP x ? y[i] : x);                          \
   }
 
 DEFMINMAXSPEC (double, mx_inline_xmin, <=)
--- a/liboctave/system/oct-env.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/system/oct-env.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -493,7 +493,7 @@
           octave::sys::password pw = octave::sys::password::getpwuid (
                                        octave::sys::getuid ());
 
-          hd = pw ? pw.dir () : std::string (octave::sys::file_ops::dir_sep_str ());
+          hd = (pw ? pw.dir () : std::string (octave::sys::file_ops::dir_sep_str ()));
         }
 
       return hd;
@@ -507,7 +507,7 @@
           octave::sys::password pw = octave::sys::password::getpwuid (
                                        octave::sys::getuid ());
 
-          user_name = pw ? pw.name () : std::string ("unknown");
+          user_name = (pw ? pw.name () : std::string ("unknown"));
         }
 
       return user_name;
--- a/liboctave/util/cmd-edit.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/util/cmd-edit.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -445,7 +445,7 @@
     completion_function = f;
 
     rl_attempted_completion_fcn_ptr fp
-      = f ? gnu_readline::command_completer : 0;
+      = (f ? gnu_readline::command_completer : 0);
 
     ::octave_rl_set_completion_function (fp);
   }
@@ -456,7 +456,7 @@
     quoting_function = f;
 
     rl_quoting_fcn_ptr fp
-      = f ? gnu_readline::command_quoter : 0;
+      = (f ? gnu_readline::command_quoter : 0);
 
     ::octave_rl_set_quoting_function (fp);
   }
@@ -467,7 +467,7 @@
     dequoting_function = f;
 
     rl_dequoting_fcn_ptr fp
-      = f ? gnu_readline::command_dequoter : 0;
+      = (f ? gnu_readline::command_dequoter : 0);
 
     ::octave_rl_set_dequoting_function (fp);
   }
@@ -478,7 +478,7 @@
     char_is_quoted_function = f;
 
     rl_char_is_quoted_fcn_ptr fp
-      = f ? gnu_readline::command_char_is_quoted : 0;
+      = (f ? gnu_readline::command_char_is_quoted : 0);
 
     ::octave_rl_set_char_is_quoted_function (fp);
   }
--- a/liboctave/util/kpse.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/util/kpse.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -714,7 +714,7 @@
       octave::sys::password p = octave::sys::password::getpwnam (user);
 
       /* If no such user, just use '.'.  */
-      std::string home = p ? p.dir () : std::string (".");
+      std::string home = (p ? p.dir () : std::string ("."));
 
       if (home.empty ())
         home = ".";
@@ -727,7 +727,7 @@
       if (name.length () > c && IS_DIR_SEP (home[home.length () - 1]))
         c++;
 
-      expansion = name.length () > c ? home : home + name.substr (c);
+      expansion = (name.length () > c ? home : home + name.substr (c));
     }
 #else /* not HAVE_PWD_H */
   expansion = name;
@@ -1147,7 +1147,7 @@
   /* Solitary or leading :?  */
   else if (IS_ENV_SEP (path[0]))
     {
-      expansion = path_len == 1 ? fallback : fallback + path;
+      expansion = (path_len == 1 ? fallback : fallback + path);
     }
 
   /* Sorry about the assignment in the middle of the expression, but
--- a/liboctave/util/oct-inttypes.h	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/util/oct-inttypes.h	Thu Apr 27 17:33:10 2017 -0700
@@ -75,7 +75,7 @@
 // MSVC, do not provide std::abs (int64_t) and std::abs (uint64_t).  In
 // the future, it should go away in favor of std::abs.
 template <typename T>
-inline T octave_int_abs (T x) { return x >= 0 ? x : -x; }
+inline T octave_int_abs (T x) { return (x >= 0 ? x : -x); }
 
 // Query for an integer type of certain sizeof, and signedness.
 template <int qsize, bool qsigned>
--- a/liboctave/util/oct-sort.cc	Thu Apr 27 15:18:20 2017 -0700
+++ b/liboctave/util/oct-sort.cc	Thu Apr 27 17:33:10 2017 -0700
@@ -1419,8 +1419,8 @@
           /* If short, extend to min (minrun, nremaining). */
           if (n < minrun)
             {
-              const octave_idx_type force = nremaining <= minrun ? nremaining
-                                                                 : minrun;
+              const octave_idx_type force = (nremaining <= minrun ? nremaining
+                                                                  : minrun);
               binarysort (data + lo, force, n, comp);
               n = force;
             }
@@ -1479,8 +1479,8 @@
           /* If short, extend to min (minrun, nremaining). */
           if (n < minrun)
             {
-              const octave_idx_type force = nremaining <= minrun ? nremaining
-                                                                 : minrun;
+              const octave_idx_type force = (nremaining <= minrun ? nremaining
+                                                                  : minrun);
               binarysort (data + lo, idx + lo, force, n, comp);
               n = force;
             }