Prevent: warning: dereferencing type-punned pointer will break strict-aliasing rules
[reactos.git] / include / ntos / types.h
index bbee9b8..ca61201 100644 (file)
@@ -113,7 +113,10 @@ typedef wchar_t *LPWSTR;
 typedef wchar_t *PWSTR;
 typedef unsigned char *PUCHAR;
 typedef unsigned short *PUSHORT;
-typedef void *PVOID;
+/* Prevent: warning: dereferencing type-punned pointer will break strict-aliasing rules
+ * As PVOID is usually used for untyped generalized casts.
+ */
+typedef void __attribute__((__may_alias__)) *PVOID;
 typedef unsigned char BYTE;
 typedef void *LPVOID;
 typedef float *PFLOAT;