diff --git a/src/backend/cdef.h b/src/backend/cdef.h
--- a/src/backend/cdef.h
+++ b/src/backend/cdef.h
@@ -911,9 +911,17 @@ union eve
         targ_float      Vfloat;
         targ_double     Vdouble;
         targ_ldouble    Vldouble;
-        Complex_f       Vcfloat;
-        Complex_d       Vcdouble;
-        Complex_ld      Vcldouble;
+        Complex_f       Vcfloat;   // 2x float
+        struct
+        {   targ_int re;
+            targ_int im;
+        } Vcfloat_as_int;
+        Complex_d       Vcdouble;  // 2x double
+        struct
+        {   targ_llong re;
+            targ_llong im;
+        } Vcdouble_as_llong;
+        Complex_ld      Vcldouble; // 2x long double
         targ_size_t     Vpointer;
         targ_ptrdiff_t  Vptrdiff;
         targ_uchar      Vreg;   // register number for OPreg elems
diff --git a/src/backend/cgcv.c b/src/backend/cgcv.c
--- a/src/backend/cgcv.c
+++ b/src/backend/cgcv.c
@@ -302,8 +302,10 @@ idx_t cv_debtyp(debtyp_t *d)
         hash = length;
         if (length >= sizeof(unsigned))
         {
-            hash += *(unsigned *)(d->data) +
-                    *(unsigned *)(&d->data[length - sizeof(unsigned)]);
+            union { unsigned char* cp; unsigned* up; } u = { d->data };
+            hash += *u.up;
+            u.cp += length - sizeof(unsigned);
+            hash += *u.up;
         }
         hashi = hash % DEBTYPHASHDIM;
         hash %= DEBTYPVECDIM;
diff --git a/src/backend/dt.c b/src/backend/dt.c
--- a/src/backend/dt.c
+++ b/src/backend/dt.c
@@ -197,7 +197,10 @@ dt_t ** dtdword(dt_t **pdtend,long value)
         pdtend = &((*pdtend)->DTnext);
     dt = dt_calloc(DT_ibytes);
     dt->DTn = 4;
-    *(long *)dt->DTdata = value;
+
+    union { char* cp; long* lp; } u = { dt->DTdata };
+    *u.lp = value;
+
     *pdtend = dt;
     pdtend = &dt->DTnext;
     return pdtend;
diff --git a/src/backend/evalu8.c b/src/backend/evalu8.c
--- a/src/backend/evalu8.c
+++ b/src/backend/evalu8.c
@@ -629,8 +629,10 @@ elem * evalu8(elem *e)
   {
       dbg_printf("d1 = %Lg, d2 = %Lg, op = %d, OPne = %d, tym = x%lx\n",d1,d2,op,OPne,tym);
       dbg_printf("tym1 = x%lx, tym2 = x%lx, e2 = %g\n",tym,tym2,e2->EV.Vdouble);
-      dbg_printf("d1 = x%08lx%08lx\n",((long*)&d1)[1],((long*)&d1)[0]);
-      dbg_printf("d2 = x%08lx%08lx\n",((long*)&d2)[1],((long*)&d2)[0]);
+
+      union eve u;
+      dbg_printf("d1 = x%16llx\n", (u.Vldouble = d1, u.Vullong));
+      dbg_printf("d2 = x%16llx\n", (u.Vldouble = d2, u.Vullong));
   }
 #endif
   i = 0;
diff --git a/src/e2ir.c b/src/e2ir.c
--- a/src/e2ir.c
+++ b/src/e2ir.c
@@ -1236,8 +1236,7 @@ elem *RealExp::toElem(IRState *irs)
              */
             c.Vfloat = value;
             if (Port::isSignallingNan(value))
-                // Put SNAN back, but this causes an aliasing warning from gcc
-                ((unsigned int*)&c.Vfloat)[0] &= 0xFFBFFFFFL;
+                c.Vuns &= 0xFFBFFFFFL; // put SNAN back
             break;
 
         case TYdouble:
@@ -1247,8 +1246,7 @@ elem *RealExp::toElem(IRState *irs)
              */
             c.Vdouble = value;
             if (Port::isSignallingNan(value))
-                // Put SNAN back, but this causes an aliasing warning from gcc
-                ((unsigned int*)&c.Vdouble)[1] &= 0xFFF7FFFFL;
+                c.Vuns &= 0xFFF7FFFFL; // Put SNAN back
             break;
 
         case TYldouble:
@@ -1288,19 +1286,19 @@ elem *ComplexExp::toElem(IRState *irs)
         case TYcfloat:
             c.Vcfloat.re = (float) re;
             if (Port::isSignallingNan(re))
-                ((unsigned int*)&c.Vcfloat.re)[0] &= 0xFFBFFFFFL;
+                c.Vcfloat_as_int.re &= 0xFFBFFFFFL;
             c.Vcfloat.im = (float) im;
             if (Port::isSignallingNan(im))
-                ((unsigned int*)&c.Vcfloat.im)[0] &= 0xFFBFFFFFL;
+                c.Vcfloat_as_int.im &= 0xFFBFFFFFL;
             break;
 
         case TYcdouble:
             c.Vcdouble.re = (double) re;
             if (Port::isSignallingNan(re))
-                ((unsigned int*)&c.Vcdouble.re)[1] &= 0xFFF7FFFFL;
+                c.Vcdouble_as_llong.re &= 0xFFFFFFFFFF7FFFFFLL;
             c.Vcdouble.im = (double) im;
             if (Port::isSignallingNan(re))
-                ((unsigned int*)&c.Vcdouble.im)[1] &= 0xFFF7FFFFL;
+                c.Vcdouble_as_llong.im &= 0xFFFFFFFFFF7FFFFFLL;
             break;
 
         case TYcldouble:
diff --git a/src/linux.mak b/src/linux.mak
--- a/src/linux.mak
+++ b/src/linux.mak
@@ -10,8 +10,8 @@ CC=g++ -m32
 
 #COV=-fprofile-arcs -ftest-coverage
 
-#GFLAGS = -Wno-deprecated -D__near= -D__pascal= -fno-exceptions -g -DDEBUG=1 -DUNITTEST $(COV)
-GFLAGS = -Wno-deprecated -D__near= -D__pascal= -fno-exceptions -O2
+#GFLAGS = -Wstrict-aliasing -Wno-deprecated -D__near= -D__pascal= -fno-exceptions -g -DDEBUG=1 -DUNITTEST $(COV)
+GFLAGS = -Wstrict-aliasing -Wno-deprecated -D__near= -D__pascal= -fno-exceptions -O2
 
 CFLAGS = $(GFLAGS) -I$(ROOT) -D__I86__=1 -DMARS=1 -DTARGET_LINUX=1 -D_DH
 MFLAGS = $(GFLAGS) -I$C -I$(TK) -D__I86__=1 -DMARS=1 -DTARGET_LINUX=1 -D_DH
diff --git a/src/mtype.c b/src/mtype.c
--- a/src/mtype.c
+++ b/src/mtype.c
@@ -2832,14 +2832,17 @@ Expression *TypeBasic::defaultInit(Loc loc)
      * so that uninitialised variables can be
      * detected even if exceptions are disabled.
      */
-    unsigned short snan[8] = { 0, 0, 0, 0xA000, 0x7FFF };
+    union {
+        unsigned short us[8];
+        long double    ld;
+    } snan = {{ 0, 0, 0, 0xA000, 0x7FFF }};
     /*
      * Although long doubles are 10 bytes long, some
      * C ABIs pad them out to 12 or even 16 bytes, so
      * leave enough space in the snan array.
      */
     assert(REALSIZE <= sizeof(snan));
-    d_float80 fvalue = *(long double*)snan;
+    d_float80 fvalue = snan.ld;
 #endif
 
 #if LOGDEFAULTINIT
diff --git a/src/root/port.c b/src/root/port.c
--- a/src/root/port.c
+++ b/src/root/port.c
@@ -417,7 +417,8 @@ int Port::isInfinity(double r)
 #undef signbit
 int Port::Signbit(double r)
 {
-    return (long)(((long *)&r)[1] & 0x80000000);
+    union { double d; long l; } u = { r };
+    return u.l & 0x80000000;
 }
 
 double Port::floor(double d)
