diff --git a/include/quakedef.h b/include/quakedef.h
index a9c1800..b782d99 100644
--- a/include/quakedef.h
+++ b/include/quakedef.h
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 //define	PARANOID			// speed sapping error checking
 
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__GNUC__)
 #pragma warning( disable : 4244 4127 4201 4214 4514 4305 4115 4018)
 #endif
 
diff --git a/include/qwsvdef.h b/include/qwsvdef.h
index f758d3e..10f09ab 100644
--- a/include/qwsvdef.h
+++ b/include/qwsvdef.h
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 //define	PARANOID			// speed sapping error checking
 
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__GNUC__)
 #pragma warning( disable : 4244 4127 4201 4214 4514 4305 4115 4018)
 #endif
 
@@ -71,4 +71,4 @@ void SV_Init (quakeparms_t *parms);
 void Con_Printf (char *fmt, ...);
 void Con_DPrintf (char *fmt, ...);
 
-#endif
\ No newline at end of file
+#endif
diff --git a/include/winquake.h b/include/winquake.h
index 2a37f72..b30b31a 100644
--- a/include/winquake.h
+++ b/include/winquake.h
@@ -25,7 +25,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #ifdef _WIN32 
 
-#pragma warning( disable : 4229 )  /* mgraph gets this */
+#ifndef __GNUC__
+# pragma warning( disable : 4229 )  /* mgraph gets this */
+#endif
 
 #include <windows.h>
 #include <ddraw.h>
diff --git a/source/mathlib.c b/source/mathlib.c
index e9fcd36..ff0349e 100644
--- a/source/mathlib.c
+++ b/source/mathlib.c
@@ -96,7 +96,7 @@ void PerpendicularVector( vec3_t dst, const vec3_t src )
 	VectorNormalize( dst );
 }
 
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__GNUC__)
 #pragma optimize( "", off )
 #endif
 
@@ -156,7 +156,7 @@ void RotatePointAroundVector( vec3_t dst, const vec3_t dir, const vec3_t point,
 	}
 }
 
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__GNUC__)
 #pragma optimize( "", on )
 #endif
 
diff --git a/source/sv_send.c b/source/sv_send.c
index a287226..fb583e6 100644
--- a/source/sv_send.c
+++ b/source/sv_send.c
@@ -713,7 +713,7 @@ void SV_UpdateToReliableMessages (void)
 	SZ_Clear (&sv.datagram);
 }
 
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__GNUC__)
 #pragma optimize( "", off )
 #endif
 
@@ -806,7 +806,7 @@ void SV_SendClientMessages (void)
 	}
 }
 
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__GNUC__)
 #pragma optimize( "", on )
 #endif
 
@@ -830,4 +830,3 @@ void SV_SendMessagesToAll (void)
 	
 	SV_SendClientMessages ();
 }
-