Re: Bugs blocking the 6.1 release

"Markus Mützel" <[email protected]>
Newsgroups gmane.comp.gnu.octave.maintainers
Message-ID <trinity-661e2498-cef6-461c-93c4-1b2f98cbda9b-1589643390719@3c-app-gmx-bs29>
Am 16. Mai 2020 um 16:38 Uhr schrieb "John W. Eaton":
> On 5/16/20 4:58 AM, "Markus Mützel" wrote:
> > Cross-building the stable-octave target with MXE Octave fails with the following error:
> > 
> > /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/tmp-stable-octave/octave-6.0.1/libinterp/octave-value/ov-fcn-handle.cc: In constructor 'octave::simple_fcn_handle::simple_fcn_handle(const octave_value&, const string&)':
> > /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/tmp-stable-octave/octave-6.0.1/libinterp/octave-value/ov-fcn-handle.cc:181:28: warning: declaration of 'octave_function* fcn' shadows a parameter [-Wshadow]
> >    181 |           octave_function *fcn = m_fcn.function_value ();
> >        |                            ^~~
> 
> [...]
> 
> I'll check out the warnings.  What version of GCC are you using that 
> produces these warnings?  I don't recall seeing them with GCC 8.

$ gcc --version
gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

In MXE Octave, gcc is at version 9.3.0, too.


> > /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/tmp-stable-octave/octave-6.0.1/libinterp/octave-value/ov-fcn-handle.cc: In member function 'virtual bool octave_fcn_handle::load_hdf5(octave_hdf5_id, const char*)':
> > /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/tmp-stable-octave/octave-6.0.1/libinterp/octave-value/ov-fcn-handle.cc:2640:27: error: cannot bind non-const lvalue reference of type 'octave_hdf5_id&' {aka 'long long int&'} to an rvalue of type 'octave_hdf5_id' {aka 'long long int'}
> >   2640 |       if (afh->load_hdf5 (group_hid, space_hid, type_hid))
> >        |                           ^~~~~~~~~
> > /home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/tmp-stable-octave/octave-6.0.1/libinterp/octave-value/ov-fcn-handle.cc:2022:57: note:   initializing argument 1 of 'bool octave::anonymous_fcn_handle::load_hdf5(octave_hdf5_id&, octave_hdf5_id&, octave_hdf5_id&)'
> >   2022 |   bool anonymous_fcn_handle::load_hdf5 (octave_hdf5_id& group_hid,
> >        |                                         ~~~~~~~~~~~~~~~~^~~~~~~~~
> > make[5]: *** [Makefile:20696: libinterp/octave-value/liboctave_value_la-ov-fcn-handle.lo] Error 1
> > 
> > 
> > Some of those are warnings that I also see for native builds on Ubuntu Linux. But the error about the non-const lvalue seems to be Windows specific. I'm not sure why gcc doesn't mind on Linux though (maybe some standard extension?).
> 
> Yeah, strange.  I'll try a Windows build and see if I can understand why 
> that's failing.

Not sure if this will fix it, but can the input arguments be const references?

Markus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.