2003-07-21 Martin Baulig <martin@ximian.com>
[mono.git] / mcs / mcs / report.cs
index 2a3fc301f7b7fc8f3489ecba22acbfa4034536e8..f5c90e4b4ddea74a2cd0099fde22a25e14d74ecd 100644 (file)
@@ -81,6 +81,9 @@ namespace Mono.CSharp {
 
                static public void Error (int code, Location l, string text)
                {
+                       if (code < 0)
+                               code = 8000-code;
+                       
                        string msg = String.Format (
                                "{0}({1}) error CS{2:0000}: {3}", l.Name, l.Row, code, text);
 //                             "{0}({1}) error CS{2}: {3}", l.Name, l.Row, code, text);
@@ -91,6 +94,9 @@ namespace Mono.CSharp {
 
                static public void Warning (int code, Location l, string text)
                {
+                       if (code < 0)
+                               code = 8000-code;
+                       
                        if (warning_ignore_table != null){
                                if (warning_ignore_table.Contains (code))
                                        return;
@@ -137,6 +143,9 @@ namespace Mono.CSharp {
 
                static public void Error (int code, string text)
                {
+                       if (code < 0)
+                               code = 8000-code;
+                       
                        string msg = String.Format ("error CS{0:0000}: {1}", code, text);
 //                     string msg = String.Format ("error CS{0}: {1}", code, text);