diff --git a/platform.hpp b/platform.hpp
index 904c23cf..c8c57f9e 100644
--- a/platform.hpp
+++ b/platform.hpp
@@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with libgim. If not, see .
*
- * Copyright 2010-2012 Danny Robson
+ * Copyright 2012 Danny Robson
*/
#ifndef __UTIL_PLATFORM_HPP
@@ -28,4 +28,13 @@
#error "Unknown platform"
#endif
+// Clang needs to be checked before GCC as it pretends to be GCC
+#if defined(__clang__)
+ #define COMPILER_CLANG
+#elif defined(__GNUC__)
+ #define COMPILER_GCC
+#else
+ #error "Unknown compiler"
+#endif
+
#endif