I did some digging and decided to share what I found, since this only
occurs on a specific compiler and is thus hard to discover.
Kurt, pay attention, as I just recommended that you do this :-)
Apparently code like this:
(foo_struct){0, 0, NULL}
is a C99 extension, so we probably shouldn't use it. Furthermore it
makes things fail in g++ 4.2.4 (but not in earlier or later versions I
tried -- anyway, 4.2.4 is the one currently on sage.math).
(The reason it fails is largely due to us jumping out of the scope
everywhere on exceptions)
What I did for complex numbers was replace their use with an inline
function returning a struct with the given values. Don't know if this
can hit performance -- if the compiler inlines the function I wouldn't
think it would make a difference.
http://gcc.gnu.org/onlinedocs/gcc-3.3.1/gcc/Compound-Literals.html
http://hg.cython.org/cython-devel/rev/15ad532e2127
--
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev