You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you access a built-in type as an object, such as in map(float, x), Cython generates code that gcc -O2 -Wall warns about type-punning. Here's an example:
I believe the problem is taking the address of the extern variable and then dereferencing it, e.g. (&x)->y. A way to remove the warning assign to a temporary variable, like so:
scoder changed resolution to invalid status from new to closed
commented
This is most likely the normal Py2.x strict-aliasing problem. Please build modules with -fno-strict-aliasing under Py2. This problem has been fixed in Py3.
If you access a built-in type as an object, such as in
map(float, x)
, Cython generates code thatgcc -O2 -Wall
warns about type-punning. Here's an example:Here's the offending code:
I believe the problem is taking the address of the extern variable and then dereferencing it, e.g.
(&x)->y
. A way to remove the warning assign to a temporary variable, like so:I am not certain if this truly fixes the problem, or just stops gcc from warning.
Migrated from http://trac.cython.org/ticket/395
The text was updated successfully, but these errors were encountered: