On 6/12/08, Carl Witty <[EMAIL PROTECTED]> wrote: > I don't think the solution is nearly so complicated. Can't you just > cast the function to the correct type? > > vtable_Parrot.describe = (void (*)(struct Parrot *))Norwegian_describe;
Well, the type of 'Norwegian_describe' is acctually 'void (*)(struct *Norwegian)'. If those types aren't aliasables, then that will break strict aliasing rules. What I do not know if in this case the funtions types can alias each other (I guess they cannot). In the end, I do not expect any compiler to generate bad code for this particular case, but perhaps we still get the nasty GCC warnings. IMHO, all Cython-generated code should compile free of warnings... -- Lisandro Dalcín --------------- Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594 _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
