]> granicus.if.org Git - yasm/commit
expr.c (expr_expand_equ): Work around what I believe to be a GCC aliasing
authorPeter Johnson <peter@tortall.net>
Fri, 27 Oct 2006 07:29:28 +0000 (07:29 -0000)
committerPeter Johnson <peter@tortall.net>
Fri, 27 Oct 2006 07:29:28 +0000 (07:29 -0000)
commit0aaf40ad26f282ba6764dafacfdcf8c1133ebfc9
tree3e08954b543a55f6cbe402f9863dd3a4f38d910b
parentbfac47e0623224bc3edda752c4f8af4797d92bd7
expr.c (expr_expand_equ): Work around what I believe to be a GCC aliasing
bug (probably http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28778) by not
accepting NULL for eh, and giving it the static eh at the sole caller of
this function (yasm_expr__level_tree).  While I'm here, clean up the logic
a bit to avoid relying on ee.e NULL value.  This fix prevents crashes in
GCC 4.1.1 with -fstrict-aliasing (enabled by -O2).

Noticed by: Danny Reeves <danny_reeves@hotmail.com>

svn path=/trunk/yasm/; revision=1665
libyasm/expr.c