Index: src/Common/SemanticError.cc
===================================================================
--- src/Common/SemanticError.cc	(revision 6bc7653768257ff5dd54d9b2c835603f2c69bccc)
+++ src/Common/SemanticError.cc	(revision 2103a51879923a5cf09538ebe5eafe88ba1827de)
@@ -50,5 +50,26 @@
 }
 
-void SemanticWarningImpl( CodeLocation location, std::string msg ) {
+namespace {
+	// convert format string and arguments into a single string
+	std::string fmtToString(const char * fmt, va_list ap) {
+		int size = 128;
+		while ( true ) {
+			char buf[size];
+			va_list args;
+			va_copy( args, ap );
+			int n = vsnprintf(&buf[0], size, fmt, args);
+			va_end( args );
+			if ( n < size && n >= 0 ) return buf;
+			size *= 2;
+		}
+		assert( false );
+	}
+}
+
+void SemanticWarningImpl( CodeLocation location, Warning, const char * const fmt, ... ) {
+	va_list args;
+	va_start(args, fmt);
+	std::string msg = fmtToString( fmt, args );
+	va_end(args);
 	std::cerr << ErrorHelpers::bold() << location << ErrorHelpers::warning_str() << ErrorHelpers::reset_font() << msg << std::endl;
 }
Index: src/Common/SemanticError.h
===================================================================
--- src/Common/SemanticError.h	(revision 6bc7653768257ff5dd54d9b2c835603f2c69bccc)
+++ src/Common/SemanticError.h	(revision 2103a51879923a5cf09538ebe5eafe88ba1827de)
@@ -49,5 +49,5 @@
 );
 
-#define SemanticWarning(loc, id, ...) SemanticWarningImpl(loc, id, WarningFormats[id], __VA_ARGS__)
+#define SemanticWarning(loc, id, ...) SemanticWarningImpl(loc, id, WarningFormats[(int)id], __VA_ARGS__)
 
 void SemanticWarningImpl (CodeLocation loc, Warning warn, const char * const fmt, ...) __attribute__((format(printf, 3, 4)));
