Hi, On Fri, Jan 30, 2015 at 1:49 AM, Michael <superm...@posteo.de> wrote: > Hello, > > if I try to compile the following minimal example: > > cdef class Test: > > cdef readonly int INFINITY > > cython does not complain but gcc refuses with an error message: > In file included from /usr/include/math.h:38:0, > from /usr/include/python2.7/pyport.h:325, > from /usr/include/python2.7/Python.h:58, > from testinf.c:16: > testinf.c:433:7: error: field '__builtin_inff' declared as a function > int INFINITY; > ^ > testinf.c: In function '__pyx_pf_7testinf_4Test_8INFINITY___get__': > testinf.c:569:50: error: expected identifier before '(' token > __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->INFINITY); if > (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; > __pyx_clineno = __LINE__; goto __pyx_L1_error;} > ^ > Apparently the name "INFINITY" is handled wrongly; any other variable > name seems to be fine.
Maybe you hit the INFINITY gcc macro? http://www.gnu.org/software/libc/manual/html_node/Infinity-and-NaN.html Cheers, Matthew _______________________________________________ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel