------- Comment #2 from sorenj at us dot ibm dot com  2007-07-09 13:55 -------
Please refer to
https://sourceforge.net/tracker/?func=detail&atid=101645&aid=1560993&group_id=1645

Long story short - as it stands today: C++ standards team won't change the spec
to allow type punning, gcc team won't "fix" code generation if it involves type
punning, swig team won't rewrite the code generators to generate ANSI spec
compliant code.

(The only way to do this by current ANSI spec rules is to memcpy the contents
of the pointers themselves from a pointer of one type to a pointer of another
type.)

Your only solution at this time is to use -fno-strict-aliasing when compiling
swig wrapper code.  This has been a major headache mainly for package
maintainers.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32697

Reply via email to