Patch for Quad.cc compile error on Sun/GCC
John W. Eaton
jwe at octave.org
Mon May 4 14:20:08 CDT 2009
On 19-Apr-2009, Carsten Clark wrote:
| Hello all,
|
| I wrote about this on 4/14, but I couldn't build tip then. I can
| build now and verify that the patch works. I've attached the same
| patch with the date updated. Below is a synopsis of the bug again.
|
| Building tip (9136) using GCC 4.3.3 on Solaris fails in liboctave/Quad.cc:
|
| Quad.cc: In function 'octave_idx_type float_user_function(float*,
| int&, float*)':
| Quad.cc:110: error: 'access_float' was not declared in this scope
| Quad.cc:120: error: 'assign_float' was not declared in this scope
|
| The attached patch removes calls to the nonexistent utility functions
| access_float() and assign_float() which are made when "sun" and
| "__GNUC__" are defined.
|
| Applying the patch makes tip build successfully for me. The build
| passes all tests that are run when I do "gmake check". I can also
| run:
|
| octave:2> quad ( @(x) x, 0, 2 )
| ans = 2
I checked in the change, but what about
quad (@(x) x, single (0), single (2))
? Are you using the Sun Fortran compiler? My guess is that it will
work, and that GCC and the Sun Fortran compiler will handle floats in
a compatible way, unlike for doubles.
Thanks,
jwe
More information about the Bug-octave
mailing list