[Mono-bugs] [Bug 82444][Nor] New - mcs reports different char position errors than csc
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Aug 14 21:58:31 EDT 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by remy.suen at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=82444
--- shadow/82444 2007-08-14 21:58:31.000000000 -0400
+++ shadow/82444.tmp.28841 2007-08-14 21:58:31.000000000 -0400
@@ -0,0 +1,71 @@
+Bug#: 82444
+Product: Mono: Compilers
+Version: 1.2
+OS:
+OS Details: SP2
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: remy.suen at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: mcs reports different char position errors than csc
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+This problem I saw seems like something that would get reported often and I
+tried to use searches and looked at
+http://bugzilla.ximian.com/mostfrequent.cgi but didn't find anything so I
+hope this isn't a dupe.
+
+Basically, mcs is automatically translating the tab character '\t' into
+eight spaces which causes the position reporting to be different from csc.
+
+Steps to reproduce the problem:
+1. Create a new C# file with the following contents.
+
+ [TestFixture]
+public class TestNUnit {
+}
+
+Note that the space before '[TestFixture]' should be a tab and not spaces.
+
+2. Compile the file with gmcs.
+
+D:\test\src>"C:\Program Files\Mono-1.2.4\bin\gmcs" TestNUnit.cs
+TestNUnit.cs(1,10): error CS0246: The type or namespace name `TestFixture'
+could not be found. Are you missing a using directive or an assembly reference?
+Compilation failed: 1 error(s), 0 warnings
+
+3. Compile the file with csc.
+
+D:\test\src>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe TestNUnit.cs
+Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.42
+for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
+Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
+
+TestNUnit.cs(1,3): error CS0246: The type or namespace name 'TestFixture'
+could not be found (are you missing a using directive or an assembly
+reference?)
+
+Actual Results:
+See that gmcs is giving (1,10) whereas csc is giving (1,3). The first
+character is the tab, the second is the '[' and the third is the 'T', which
+is the beginning of the 'TestFixture' error. In gmcs's case, the first tab
+character turns into eight characters, the ninth is the '[' and the tenth
+is the 'T'.
+
+Expected Results:
+I would've expected gmcs to give (1,3) as well.
+
+How often does this happen?
+Reproducible consistently.
+
+Additional Information:
+I am running Mono 1.2.4.
More information about the mono-bugs
mailing list