On 13 September 2011 01:09, Robert Bradshaw <rober...@math.washington.edu> wrote: > On Mon, Sep 12, 2011 at 7:19 PM, Lisandro Dalcin <dalc...@gmail.com> wrote: >> On 9 September 2011 05:26, Robert Bradshaw <rober...@math.washington.edu> >> wrote: >>> Does it work with icc if you replace >>> >>> # define CYTHON_UNUSED __attribute__ ((__unused__)) >>> >>> with >>> >>> # define CYTHON_UNUSED __attribute__ ((unused)) >>> >>> ? >>> >>> >>> On Fri, Sep 9, 2011 at 12:28 AM, Christoph Gohlke <cgoh...@uci.edu> wrote: >>>> Hello, >>>> >>>> compiling Cython 0.15 generated C code on Windows using the Intel Compiler >>>> 11.1 icl.exe results in an "expected a type specifier" error. >>>> >>>> For example: >>>> >>>> /* "numpy.pxd":190 >>>> * # experimental exception made for __getbuffer__ and >>>> __releasebuffer__ >>>> * # -- the details of this may change. >>>> * def __getbuffer__(ndarray self, Py_buffer* info, int flags): >>>> # <<<<<<<<<<<<<< >>>> * # This implementation of getbuffer is geared towards Cython >>>> * # requirements, and does not yet fullfill the PEP. >>>> */ >>>> >>>> static CYTHON_UNUSED int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject >>>> *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ >>>> ^ >>>> Error: expected a type specifier. >>>> >>>> The problem is the definition of CYTHON_UNUSED. >>>> >>>> Please consider the attached patch. It works for me but maybe the problem >>>> is >>>> icl version specific, not Windows specific. >>>> >> >> Robert, could you apply this patch? > > Done. I'm still wondering if it's broken for __INTEL_COMPILER > non-windows, but don't have any way to test it out. >
In my Linux box, it seens to works just fine. However, now I think that the correct guard should be: # elif (defined(__ICC) || (defined(__INTEL_COMPILER)) && !defined(_MSC_VER) Anyway, the __ICC definition is obsolete. -- Lisandro Dalcin --------------- CIMEC (INTEC/CONICET-UNL) Predio CONICET-Santa Fe Colectora RN 168 Km 472, Paraje El Pozo 3000 Santa Fe, Argentina Tel: +54-342-4511594 (ext 1011) Tel/Fax: +54-342-4511169 _______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel