Bug 317289 (MONO72968) - [PATCH] CS0658 is not reported
Summary: [PATCH] CS0658 is not reported
Status: RESOLVED FIXED
Alias: MONO72968
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Minor
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-24 16:31 UTC by Marek Safar
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
proposed fix (3.64 KB, patch)
2005-08-23 21:21 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:08:42 UTC


---- Reported by marek.safar@seznam.cz 2005-02-24 09:31:05 MST ----

Please fill in this template when reporting a bug, unless you know what you
are doing.
Description of Problem:

Compile sample.

Steps to reproduce the problem:

using System;

[class:Serializable]
public class C
{
    public static void Main () {}
}

Actual Results:

error CS8025: Parsing error

Expected Results:

CS0658: 'class' is not a recognized attribute location.



---- Additional Comments From atsushi@ximian.com 2005-08-23 14:21:21 MST ----

Created an attachment (id=167464)
proposed fix




---- Additional Comments From atsushi@ximian.com 2005-08-23 14:22:40 MST ----

With the attached patch, the output is:

$ mono ../../svn/mcs/mcs/mcs.exe 72968.cs
syntax error, got token `CLASS'
72968.cs(5,2): warning CS0658: 'class' is not a recognized attribute
location. All attributes in this attribute section will be ignored.
Compilation succeeded - 1 warning(s)

Is there any way to surpress "syntax error" line?




---- Additional Comments From miguel@ximian.com 2005-08-23 15:59:11 MST ----

The only way of eliminating the error is to add CLASS to the grammar
so it vecomes an acceptable way of parsing the input



---- Additional Comments From atsushi@ximian.com 2005-08-23 17:45:03 MST ----

Ok, but if in that way we have to list all the keywords up such as
struct, int, unsafe... it will mess cs-parser.jay.

Maybe this fix is better as a compromised solution.



---- Additional Comments From marek.safar@seznam.cz 2007-02-18 10:53:27 MST ----

Fixed in SVN.

Imported an attachment (id=167464)

Unknown operating system unknown. Setting to default OS "Other".