Only ignore GCC warning if using GNUC compiler.

To avoid warnings in Microsoft Visual Studio.