[Cython] PATCH: use function pointer arguments in import/export api functions
Stefan Behnel
stefan_ml at behnel.de
Sun Mar 1 21:29:18 CET 2009
Stefan Behnel wrote:
> Lisandro Dalcin wrote:
>> Just to prevent this:
>> warning: ISO C forbids conversion of function pointer to object pointer type
>
> with this patch applied, I now get a warning on this line:
>
> p = *(void **)&f;
>
> src/lxml/lxml.etree.c: In function '__Pyx_ExportFunction':
> src/lxml/lxml.etree.c:148416: warning: dereferencing type-punned pointer
> will break strict-aliasing rules
>
> This needs fixing, I guess. That said, I'm more in favour of enabling clean
> strict-aliasing than to be strictly C89 compliant, unless we can have both. :)
I reverted the patch for now. Lisandro, if you can come up with a fix that
does not break strict aliasing (or a partial patch that only adds consts
and the like), please give it another try.
Stefan
More information about the Cython-dev
mailing list