Patch for Quad.cc compile error on Sun/GCC
Carsten Clark
tantumquantum+gnuoctave at gmail.com
Mon Apr 13 23:31:16 CDT 2009
2009/4/14 Jaroslav Hajek <highegg at gmail.com>:
>
> This is a bug in gcc (the old 3.x series) which is not able to resolve
> such complicated template overloading (which is otherwise correct).
> Upgrading gcc should help. So far nobody actually needed a work-around
> patch for gcc 3, though I offered to make one.
Thanks. I was afraid of that.
I just noticed that I failed to use the correct date in my ChangeLog
entry. Fixed patch attached.
Carsten
-------------- next part --------------
diff -r 4bb94a71913b liboctave/ChangeLog
--- a/liboctave/ChangeLog Sun Apr 12 20:40:53 2009 -0400
+++ b/liboctave/ChangeLog Tue Apr 14 00:25:48 2009 -0400
@@ -1,3 +1,8 @@
+2009-04-14 Carsten Clark <tantumquantum+gnuoctave at gmail.com>
+
+ * Quad.cc (float_user_function): Remove Sun/GCC special case
+ calling nonexistent utility functions.
+
2009-04-04 Jaroslav Hajek <highegg at gmail.com>
* Array.cc (Array<T>::make_unique): Don't economize when unique.
diff -r 4bb94a71913b liboctave/Quad.cc
--- a/liboctave/Quad.cc Sun Apr 12 20:40:53 2009 -0400
+++ b/liboctave/Quad.cc Tue Apr 14 00:25:48 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