[MLton-commit] r4545
Stephen Weeks
MLton@mlton.org
Mon, 15 May 2006 19:06:03 -0700
Used the same gcc-specific attributes to define "pointer" to be 4-byte
aligned as we did for "Pointer". This eliminated all but six of the
warning about "cast increases required alignment of target type".
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/util/pointer.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/util/pointer.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/util/pointer.h 2006-05-16 01:51:43 UTC (rev 4544)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/util/pointer.h 2006-05-16 02:06:02 UTC (rev 4545)
@@ -6,7 +6,10 @@
* See the file MLton-LICENSE for details.
*/
-typedef unsigned char* pointer;
// typedef void* pointer;
+// typedef unsigned char* pointer;
+typedef unsigned char pointerAux __attribute__ ((aligned (4), may_alias));
+typedef pointerAux* pointer;
+
#define POINTER_SIZE sizeof(pointer)
#define FMTPTR "0x%016"PRIxPTR