octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gcc7 warnings


From: Dmitri A. Sergatskov
Subject: gcc7 warnings
Date: Thu, 27 Apr 2017 23:08:34 -0500

I have been compiling octave dev on Fedora-26 (alpha) that has gcc7 (and few other newer tools), and while it works just fine there are few extra warning which i do not see
on the Fedora 25 (current release gcc 6.3.1):

* Quite a few of type:
<<<<
../liboctave/operators/mx-inlines.cc:582:1: warning: mangled name for ‘bool do_mx_check(const Array<T>&, bool (*)(size_t, const T*) throw ()) [with T = octave_int<short unsigned int>]’ will change in C++17 because the exception specification is part of a function type [-Wnoexcept-type]
>>>>
those are, I assume, bening

* Few of -Wimplicit-fallthrough which look more serious
(
https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/
) E.g.:

<<<<
../libinterp/octave-value/ov-classdef.cc: In member function ‘virtual octave_value_list cdef_object_array::subsref(const string&, const std::__cxx11::list<octave_value_list>&, int, size_t&, const cdef_class&, bool)’:
../libinterp/octave-value/ov-classdef.cc:1552:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
         }
         ^
../libinterp/octave-value/ov-classdef.cc:1555:5: note: here
     default:
     ^~~~~~~
>>>>

* Few  of "-Wint-in-bool-context" like (also look bening to me):

<<<<
../libinterp/octave-value/ov-typeinfo.cc: In static member function ‘static bool octave_value_typeinfo::register_assign_op(octave_value::assign_op, int, int, octave_value_typeinfo::assign_op_fcn)’:
../libinterp/octave-value/ov-typeinfo.cc:142:10: warning: ?: using integer constants in boolean context [-Wint-in-bool-context]
   return (instance_ok ())
          ~~~~~~~~~~~~~~~~
          ? instance->do_register_assign_op (op, t_lhs, t_rhs, f) : -1;
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../libinterp/octave-value/ov-typeinfo.cc: In static member function ‘static bool octave_value_typeinfo::register_assignany_op(octave_value::assign_op, int, octave_value_typeinfo::assignany_op_fcn)’:
../libinterp/octave-value/ov-typeinfo.cc:150:10: warning: ?: using integer constants in boolean context [-Wint-in-bool-context]
   return (instance_ok ())
          ~~~~~~~~~~~~~~~~
          ? instance->do_register_assignany_op (op, t_lhs, f) : -1;
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 >>>>

If there is an interest, I can post all of them.
On related subject, if there is an interest, I should be able to update Fedora buildbot
to F26 sooner rather than later.

Dmitri.
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]