--- a/cmajor++/Cm/Cm.Compiler/Main.cpp
+++ b/cmajor++/Cm/Cm.Compiler/Main.cpp
@@ -53,6 +53,16 @@
     _CrtSetDbgFlag(dbgFlags);
     //_CrtSetBreakAlloc(2345207);
 #endif
+#ifndef NDEBUG
+    const char* compilerMode = "debug mode";
+    const char* compilerName = "cmcd";
+#elif defined(ASSERTIONS)
+    const char* compilerMode = "assert mode";
+    const char* compilerName = "cmca";
+#else
+    const char* compilerMode = "release mode";
+    const char* compilerName = "cmc";
+#endif
     try
     {
         signal(SIGSEGV, AccessViolation);
@@ -62,10 +72,11 @@
         std::string platformPathSeparator = std::string(1, GetPlatformPathSeparatorChar());
         if (argc < 2)
         {
-            std::cerr << "Cmajor compiler version " << version << " " << platformBits << std::endl;
-            std::cerr << "usage: cmc [options] {file.cms | file.cmp}" << std::endl;
+            std::cerr << "Cmajor " << compilerMode << " compiler version " << version << " " << platformBits << std::endl;
+            std::cerr << "usage: " << compilerName << " [options] {file.cms | file.cmp}" << std::endl;
             std::cerr << "build solution file.cms or project file.cmp using options:\n";
             std::cerr << "-R                    : rebuild\n";
+            std::cerr << "-clean                : clean solution or project\n";
             std::cerr << "-config=<config>      : use <config> configuration (default=debug)\n";
             std::cerr << "-O=<n>                : set optimization level to <n>\n";
             std::cerr << "                        (defaults: debug: O=0, release: O=3)\n";
@@ -77,10 +88,10 @@
             std::cerr << "-pic                  : print intermediate code after each optimization pass\n";
             std::cerr << "                        to file file.opt\n";
             std::cerr << "-nocttc               : no constrained template type checking\n";
-            std::cerr << "-deducenothrow        : deduce nothrow for functions not marked nothrow\n";
             std::cerr << "-time                 : report compilation time\n";
             std::cerr << "-quiet                : output only errors\n";
             std::cerr << "-verbose              : generate verbose output\n";
+            std::cerr << "-stats                : print statistics\n";
             std::cerr << "--------------------------------------------------------------------------\n";
             std::cerr << "-debug:cc             : debug compiling classes\n";
             std::cerr << "-debug:cf             : debug compiling functions\n";
@@ -135,6 +146,10 @@
                         {
                             settings.SetRebuild(true);
                         }
+                        else if (arg == "-clean")
+                        {
+                            settings.SetClean(true);
+                        }
                         else if (arg == "-S")
                         {
                             settings.SetGenerateNativeAssemblySourceCode();
@@ -147,10 +162,6 @@
                         {
                             settings.SetNoConstrainedTemplateTypeChecking();
                         }
-                        else if (arg == "-deducenothrow")
-                        {
-                            flags = flags | Flags::debugNothrow;
-                        }
                         else if (arg == "-time")
                         {
                             reportTime = true;
@@ -178,10 +189,6 @@
                         else if (arg == "-debug:arch")
                         {
                             flags = flags | Flags::debugArchetypes;
-                        }
-                        else if (arg == "-debug:nothrow")
-                        {
-                            flags = flags | Flags::debugNothrow;
                         }
                         else if (arg == "-L")
                         {
@@ -230,7 +237,7 @@
         SetFlags(flags);
         if ((flags & Flags::quiet) == Flags::none)
         {
-            std::cout << "Cmajor compiler version " << version << " " << platformBits << std::endl;
+            std::cout << "Cmajor " << compilerMode << " compiler version " << version << " " << platformBits << std::endl;
         }
         if (cmFiles.empty())
         {
@@ -252,11 +259,14 @@
         auto dur = end - start;
         if (reportTime)
         {
-            long long totalSecs = duration_cast<seconds>(dur).count();
+            long long totalSecs = duration_cast<seconds>(dur).count() + 1;
             int hours = static_cast<int>(totalSecs / 3600);
             int mins = static_cast<int>(totalSecs / 60 % 3600);
             int secs = static_cast<int>(totalSecs % 60);
-            std::cout << (hours > 0 ? std::to_string(hours) + " hours " : "") << (mins > 0 ? std::to_string(mins) + " mins " : "") << secs << " seconds" << std::endl;
+            std::cout << 
+                (hours > 0 ? std::to_string(hours) + " hour" + ((hours != 1) ? "s " : " ") : "") << 
+                (mins > 0 ? std::to_string(mins) + " minute" + ((mins != 1) ? "s " : " ") : "") << 
+                secs << " second" << ((secs != 1) ? "s" : "") << std::endl;
         }
         return 0;
     }
@@ -264,12 +274,12 @@
     {
         if (UseDevEnvErrorFormat())
         {
-            std::cout << ex.Message() << std::endl;
-            PrintErrorForDevEnv(ex.ToolName(), L0 + LINK_ERROR, ex.Message(), ex.FilePath(), ex.Line(), ex.Column(), GetCurrentProject() ? GetCurrentProject()->Name() : "");
-        }
-        else
-        {
-            std::cerr << "link error in file " << ex.FilePath() << " at line " << ex.Line() << " col " << ex.Column() << ":\n" << ex.ToolName() << ": " << ex.Message() <<  std::endl;
+            std::cout << ex.what() << std::endl;
+            PrintErrorForDevEnv("llvm-link", L0 + LINK_ERROR, ex.what(), Position(), Position(), GetCurrentProject() ? GetCurrentProject()->Name() : "");
+        }
+        else
+        {
+            std::cerr << ex.what() << std::endl;
         }
     }
     catch (const AssemblyException& ex)
@@ -289,7 +299,7 @@
         if (UseDevEnvErrorFormat())
         {
             std::cout << ex.what() << std::endl;
-            PrintErrorForDevEnv("cmc", 1, ex.what(), ex.GetPosition(), Position(), GetCurrentProject() ? GetCurrentProject()->Name() : "");
+            PrintErrorForDevEnv(compilerName, 1, ex.what(), ex.GetPosition(), Position(), GetCurrentProject() ? GetCurrentProject()->Name() : "");
         }
         else
         {
@@ -301,7 +311,7 @@
         if (UseDevEnvErrorFormat())
         {
             std::cout << ex.what() << std::endl;
-            PrintErrorForDevEnv("cmc", 1, ex.what(), ex.GetPosition(), Position(), GetCurrentProject() ? GetCurrentProject()->Name() : "");
+            PrintErrorForDevEnv(compilerName, 1, ex.what(), ex.GetPosition(), Position(), GetCurrentProject() ? GetCurrentProject()->Name() : "");
         }
         else
         {
@@ -313,7 +323,7 @@
         if (UseDevEnvErrorFormat())
         {
             PrintError(ex.Number(), ex, true);
-            PrintErrorForDevEnv("cmc", ex.Number(), ex.Message(), ex.ErrorPos(), ex.InnerErrorPos(), GetCurrentProject() ? GetCurrentProject()->Name() : "");
+            PrintErrorForDevEnv(compilerName, ex.Number(), ex.Message(), ex.ErrorPos(), ex.InnerErrorPos(), GetCurrentProject() ? GetCurrentProject()->Name() : "");
         }
         else
         {
@@ -324,12 +334,25 @@
     {
         if (UseDevEnvErrorFormat())
         {
-            std::cout << ex.Message() << std::endl;
-            PrintErrorForDevEnv("cmc", I0 + ASSERTION_FAILED, ex.Message() + " in file " + ex.File() + " at line " + std::to_string(ex.Line()), Position(), Position(), GetCurrentProject() ? GetCurrentProject()->Name() : "");
-        }
-        else
-        {
-            std::cerr << ex.Message() << " in file " << ex.File() << " at line " << ex.Line() << std::endl;
+            std::cout << ex.Message() + " in file " + ex.File() + " at line " + std::to_string(ex.Line()) + (!ex.Function().empty() ? (" when compiling " + ex.Function()) : "") << std::endl;
+            PrintErrorForDevEnv(compilerName, I0 + ASSERTION_FAILED, ex.Message() + " in file " + ex.File() + " at line " + std::to_string(ex.Line()) + (!ex.Function().empty() ? (" when compiling " + ex.Function()) : ""), 
+                Position(), Position(), GetCurrentProject() ? GetCurrentProject()->Name() : "");
+        }
+        else
+        {
+            std::cerr << ex.Message() << " in file " << ex.File() << " at line " << ex.Line() << (!ex.Function().empty() ? (" when compiling " + ex.Function()) : "") << std::endl;
+        }
+    }
+    catch (const GCCException& ex)
+    {
+        if (UseDevEnvErrorFormat())
+        {
+            std::cout << "error generating executable " << ex.ExePath() << ": " << ex.what() << std::endl;
+            PrintErrorForDevEnv("gcc", G0  + GCC_ERROR, "error generating executable " + ex.ExePath() + ": " + ex.what(), Position(), Position(), GetCurrentProject() ? GetCurrentProject()->Name() : "");
+        }
+        else
+        {
+            std::cerr << "error generating executable " << ex.ExePath() << ": " << ex.what() << std::endl;
         }
     }
     catch (const std::exception& ex)
@@ -337,7 +360,7 @@
         if (UseDevEnvErrorFormat())
         {
             std::cout << ex.what() << std::endl;
-            PrintErrorForDevEnv("cmc", I0 + STD_EXCEPTION, ex.what(), Position(), Position(), GetCurrentProject() ? GetCurrentProject()->Name() : "");
+            PrintErrorForDevEnv(compilerName, I0 + STD_EXCEPTION, ex.what(), Position(), Position(), GetCurrentProject() ? GetCurrentProject()->Name() : "");
         }
         else
         {
@@ -349,7 +372,7 @@
         if (UseDevEnvErrorFormat())
         {
             std::cout << "internal compiler error (access violation)" << std::endl;
-            PrintErrorForDevEnv("cmc", I0 + ACCESS_VIOLATION, "internal compiler error (access violation)", Position(), Position(), GetCurrentProject() ? GetCurrentProject()->Name() : "");
+            PrintErrorForDevEnv(compilerName, I0 + ACCESS_VIOLATION, "internal compiler error (access violation)", Position(), Position(), GetCurrentProject() ? GetCurrentProject()->Name() : "");
         }
         else
         {