Patch for Quad.cc compile error on Sun/GCC
Carsten Clark
tantumquantum+gnuoctave at gmail.com
Sun Apr 19 21:55:47 CDT 2009
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
Thanks,
Carsten Clark
-------------- next part --------------
diff -r 537a73861cb7 liboctave/ChangeLog
--- a/liboctave/ChangeLog Sun Apr 19 15:30:12 2009 +0200
+++ b/liboctave/ChangeLog Sun Apr 19 22:35:15 2009 -0400
@@ -1,3 +1,8 @@
+2009-04-19 Carsten Clark <tantumquantum+gnuoctave at gmail.com>
+
+ * Quad.cc (float_user_function): Remove Sun/GCC special case
+ calling nonexistent utility functions.
+
2009-04-16 Jaroslav Hajek <highegg at gmail.com>
* idx-vector.cc (idx_vector::idx_range_rep::idx_range_rep (const
diff -r 537a73861cb7 liboctave/Quad.cc
--- a/liboctave/Quad.cc Sun Apr 19 15:30:12 2009 +0200
+++ b/liboctave/Quad.cc Sun Apr 19 22:35:16 2009 -0400
@@ -106,21 +106,13 @@
{
BEGIN_INTERRUPT_WITH_EXCEPTIONS;
-#if defined (sun) && defined (__GNUC__)
- float xx = access_float (x);
-#else
float xx = *x;
-#endif
quad_integration_error = 0;
float xresult = (*float_user_fcn) (xx);
-#if defined (sun) && defined (__GNUC__)
- assign_float (result, xresult);
-#else
*result = xresult;
-#endif
if (quad_integration_error)
ierr = -1;
More information about the Bug-octave
mailing list