diff --git a/gobject/gtype.h b/gobject/gtype.h
index 8a1bff2..277ec4d 100644
--- a/gobject/gtype.h
+++ b/gobject/gtype.h
@@ -1730,12 +1730,12 @@ const gchar *    g_type_name_from_class         (GTypeClass	*g_class);
 /* --- implementation bits --- */
 #ifndef G_DISABLE_CAST_CHECKS
 #  define _G_TYPE_CIC(ip, gt, ct) \
-    ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
+    ((ct*)(void*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
 #  define _G_TYPE_CCC(cp, gt, ct) \
-    ((ct*) g_type_check_class_cast ((GTypeClass*) cp, gt))
+    ((ct*)(void*) g_type_check_class_cast ((GTypeClass*) cp, gt))
 #else /* G_DISABLE_CAST_CHECKS */
-#  define _G_TYPE_CIC(ip, gt, ct)       ((ct*) ip)
-#  define _G_TYPE_CCC(cp, gt, ct)       ((ct*) cp)
+#  define _G_TYPE_CIC(ip, gt, ct)       ((ct*)(void*) ip)
+#  define _G_TYPE_CCC(cp, gt, ct)       ((ct*)(void*) cp)
 #endif /* G_DISABLE_CAST_CHECKS */
 #define _G_TYPE_CHI(ip)			(g_type_check_instance ((GTypeInstance*) ip))
 #define _G_TYPE_CHV(vl)			(g_type_check_value ((GValue*) vl))
