Changeset: 07fe931dba51 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=07fe931dba51
Modified Files:
gdk/gdk_bat.mx
Branch: Aug2011
Log Message:
avoid compiler warning: dereferencing type-punned pointer will break
strict-aliasing rules
diffs (39 lines):
diff --git a/gdk/gdk_bat.mx b/gdk/gdk_bat.mx
--- a/gdk/gdk_bat.mx
+++ b/gdk/gdk_bat.mx
@@ -1070,8 +1070,10 @@
}
@= acc_move
{
- char htmp[16];
- char ttmp[16];
+ char tmp[16];
+ /* avoid compiler warning: dereferencing type-punned pointer
+ * will break strict-aliasing rules */
+ char *tmpp = tmp;
assert(hs <= 16);
assert(ts <= 16);
@@ -1083,14 +1085,18 @@
}
/* move first to tmp */
- @:un_move(Hloc(b,@1),htmp,hs)@
- @:un_move(Tloc(b,@1),ttmp,ts)@
+ @:un_move(Hloc(b,@1),tmpp,hs)@
/* move delete to first */
@:un_move(Hloc(b,@2),Hloc(b,@1),hs)@
+ /* move first to deleted */
+ @:un_move(tmpp,Hloc(b,@2),hs)@
+
+ /* move first to tmp */
+ @:un_move(Tloc(b,@1),tmpp,ts)@
+ /* move delete to first */
@:un_move(Tloc(b,@2),Tloc(b,@1),ts)@
/* move first to deleted */
- @:un_move(htmp,Hloc(b,@2),hs)@
- @:un_move(ttmp,Tloc(b,@2),ts)@
+ @:un_move(tmpp,Tloc(b,@2),ts)@
}
@- BUN Insertion
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list