From help-request at octave dot org Wed Mar 30 16:22:23 2005 Subject: Re: 2.1.68 fails to compile on Solaris From: steven mestdagh To: "John W. Eaton" Cc: help at octave dot org Date: Thu, 31 Mar 2005 00:21:25 +0200 On Wed, Mar 30, 2005 at 04:52:12PM -0500, John W. Eaton wrote: > > Oh, maybe the following patch will help? > > jwe > > > liboctave/ChangeLog: > > 2005-03-30 John W. Eaton > > * DiagArray2.h (DiagArray::Proxy::operator T ()): > Don't use initializer. > > > Index: liboctave/DiagArray2.h > =================================================================== > RCS file: /usr/local/cvsroot/octave/liboctave/DiagArray2.h,v > retrieving revision 1.11 > diff -u -r1.11 DiagArray2.h > --- liboctave/DiagArray2.h 23 Nov 2003 08:07:53 -0000 1.11 > +++ liboctave/DiagArray2.h 30 Mar 2005 21:51:30 -0000 > at @ -86,7 +86,7 @@ > return object->get (i); > else > { > - static T foo (0); > + static T foo (); > return foo; > } > } that gives the following error (on HP-UX): g++ -c -I/freeware/gcc/include -I. -I/freeware/octave/src/octave/liboctave -I.. -I../liboctave -I../src -I../libcruft/misc -I/freeware/octave/src/octave -I/freeware/octave/src/octave/liboctave -I/freeware/octave/src/octave/src -I/freeware/octave/src/octave/libcruft/misc -I/freeware/octave/src/octave/glob -I../glob -DHAVE_CONFIG_H -Wall -W -Wshadow -g -O2 /freeware/octave/src/octave/liboctave/CollocWt.cc -o CollocWt.o In file included from /freeware/octave/src/octave/liboctave/MDiagArray2.h:31, from /freeware/octave/src/octave/liboctave/dMatrix.h:31, from /freeware/octave/src/octave/liboctave/CollocWt.h:32, from /freeware/octave/src/octave/liboctave/CollocWt.cc:33: /freeware/octave/src/octave/liboctave/DiagArray2.h: In member function `DiagArray2::Proxy::operator T() const': /freeware/octave/src/octave/liboctave/DiagArray2.h:89: error: cannot declare static function inside another function make[2]: *** [CollocWt.o] Error 1 ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------