[Mono-bugs] [Bug 591896] New: gmcs gives different diagnostics when a parsing error occurs inside a custom attribute
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Mar 29 11:05:26 EDT 2010
http://bugzilla.novell.com/show_bug.cgi?id=591896
http://bugzilla.novell.com/show_bug.cgi?id=591896#c0
Summary: gmcs gives different diagnostics when a parsing error
occurs inside a custom attribute
Classification: Mono
Product: Mono: Compilers
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Enhancement
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: mhabersack at novell.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Created an attachment (id=351165)
--> (http://bugzilla.novell.com/attachment.cgi?id=351165)
test.cs
The attached test case produces the following output when compiled with gmcs
and csc. The .NET reporting seems to be more accurate:
Mono:
----------------------
gmcs t.cs
t.cs(6,42): warning CS0658: `identifier' is invalid attribute target. All
attributes in this attribute section will be ignored
t.cs(18,1): error CS8025: Parsing error
Compilation failed: 1 error(s), 1 warnings
----------------------
NET:
----------------------
C:\temp>csc t.cs
Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.4926
for Microsoft (R) .NET Framework version 3.5
Copyright (C) Microsoft Corporation. All rights reserved.
t.cs(6,35): error CS1026: ) expected
t.cs(6,36): error CS1519: Invalid token ')' in class, struct, or interface
member declaration
t.cs(7,21): error CS1519: Invalid token '{' in class, struct, or interface
member declaration
t.cs(8,6): error CS1519: Invalid token ';' in class, struct, or interface membe
declaration
t.cs(8,11): error CS1519: Invalid token ';' in class, struct, or interface
member declaration
t.cs(11,9): error CS1518: Expected class, delegate, enum, interface, or struct
t.cs(15,9): error CS1518: Expected class, delegate, enum, interface, or struct
t.cs(15,27): error CS1001: Identifier expected
t.cs(15,29): error CS1518: Expected class, delegate, enum, interface, or struct
t.cs(18,1): error CS1022: Type or namespace definition, or end-of-file expected
----------------------
--
Configure bugmail: http://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