[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: oct-stream.cc:3495:42: note: did you mean to use logical not (‘!’)?
From: |
John W. Eaton |
Subject: |
Re: oct-stream.cc:3495:42: note: did you mean to use logical not (‘!’)? |
Date: |
Mon, 24 Jul 2017 13:54:40 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 07/24/2017 01:38 PM, Dmitri A. Sergatskov wrote:
One of the gcc7 warnings:
/bin/sh ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I.
-I../src -Iliboctave -I../src/liboctave -I../src/liboctave/array
-Iliboctave/numeric -I../src/liboctave/numeric -Iliboctave/operators
-I../src/liboctave/operators -I../src/liboctave/system
-I../src/liboctave/util -I../src/libinterp/octave-value -Ilibinterp
-I../src/libinterp -I../src/libinterp/operators -Ilibinterp/parse-tree
-I../src/libinterp/parse-tree -Ilibinterp/corefcn
-I../src/libinterp/corefcn -I../src/liboctave/wrappers
-I/usr/include/GraphicsMagick -I/usr/include/freetype2
-I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16
-fPIC -pthread -fopenmp -Wall -W -Wshadow -Wold-style-cast -Wformat
-Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -MT
libinterp/corefcn/libinterp_corefcn_libcorefcn_la-pager.lo -MD -MP -MF
libinterp/corefcn/.deps/libinterp_corefcn_libcorefcn_la-pager.Tpo -c -o
libinterp/corefcn/libinterp_corefcn_libcorefcn_la-pager.lo `test -f
'libinterp/corefcn/pager.cc' || echo
'../src/'`libinterp/corefcn/pager.cc
../src/libinterp/corefcn/oct-stream.cc: In member function ‘int
octave::textscan::read_format_once(octave::delimited_stream&,
octave::textscan_format_list&, std::__cxx11::list<octave_value>&,
Array<long int>, int&)’: ../src/libinterp/corefcn/oct-stream.cc:3495:42:
warning: ‘~’ on an expression of type bool [-Wbool-operation] if (!
is.eof () && ~is_delim (is.peek ())) ~~~~~~~~~^~~~~~~~~~~~
../src/libinterp/corefcn/oct-stream.cc:3495:42: note: did you mean to
use logical not (‘!’)?
Not sure how valid or serious it is...
Given that is_delim returns a bool, I'd guess it should be !, not ~.
I pushed this changeset:
http://hg.savannah.gnu.org/hgweb/octave/rev/0fb64e83f8b3
jwe