[Mono-bugs] [Bug 470227] New: Compiler parser problem
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Jan 28 10:06:14 EST 2009
https://bugzilla.novell.com/show_bug.cgi?id=470227
Summary: Compiler parser problem
Classification: Mono
Product: Mono: Compilers
Version: 2.2.x
Platform: Other
OS/Version: Other
Status: NEW
Severity: Major
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: informatique.internet at fiducial.fr
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=268330)
--> (https://bugzilla.novell.com/attachment.cgi?id=268330)
Main.cs
User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.9.0.5)
Gecko/2008120121 Firefox/3.0.5
I've a very annoying bug with mono mcs/gmcs mono compiler... It seems it comes
from the parser.
The bug is present with mono 2.2, 2.4 ... i've not tested with trunk
Reproducible: Always
Steps to Reproduce:
1.try to compile this
// project created on 22/10/2007 at 11:55
using System;
namespace TestCompiler
{
class MainClass
{
public static void Main(string[] args)
{
bool b=(1==2);
bool c=(1==1);
string a=(b?(c?"#":"#"):"");
}
}
}
2. hubert at hublinux ~/Projects/TestCompiler $ gmcs Main.cs
Main.cs(13,41): error CS1040: Preprocessor directives must appear as the first
non-whitespace character on a line
Main.cs(13,45): error CS1040: Preprocessor directives must appear as the first
non-whitespace character on a line
Compilation failed: 2 error(s), 0 warnings
3.
Actual Results:
Preprocessor directives must appear as the first non-whitespace character on a
line
errors...
Expected Results:
with mono 2.0, and MS.NET i obtain :
[fiducial at LXLYOSRW10 tests]$ gmcs ./Main.cs
/Main.cs(13,32): warning CS0219: The variable `a' is assigned but its value is
never used
Compilation succeeded - 1 warning(s)
Please backport the patch on both mono 2.2 and 2.4 branch!
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list