[Mono-bugs] [Bug 557748] New: Parsing error with 'fixed' statement

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Nov 23 09:03:53 EST 2009


http://bugzilla.novell.com/show_bug.cgi?id=557748

http://bugzilla.novell.com/show_bug.cgi?id=557748#c0


           Summary: Parsing error with 'fixed' statement
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.4.x
          Platform: Other
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: abels at bluewin.ch
         QAContact: mono-bugs at lists.ximian.com
          Found By: Development
           Blocker: No


It's not possible to specify the following 'fixed' statement format :

fixed (fixed-pointer-declarators , fixed-pointer-declarator) {}


The following little program show the problem:

using System;

namespace TestFixed
{
    class MainClass
    {
        static long        l1;
        static long        l2;

        public unsafe static void Main(string[] args)
        {
            // First manner : Ok
            fixed (long* pl1 = &l1) {
                fixed (long* pl2 = &l2) {
                }
            }

            // Second manner : Parsing error
            fixed (long* pl1 = &l1, long* pl2 = &l2) {
            }
        }
    }
}

The compilation line is :

/usr/bin/gmcs "/out:/home/abeguin/Projects/TestFixed/bin/Release/TestFixed.exe"
"/r:System.dll" /noconfig /nologo /warn:4 /optimize- /codepage:utf8 -unsafe
/t:exe "/home/abeguin/Projects/TestFixed/Main.cs"
"/home/abeguin/Projects/TestFixed/AssemblyInfo.cs" 
Compilation failed: 2 error(s), 0 warnings

/home/abeguin/Projects/TestFixed/Main.cs(17,52): error CS1525: Unexpected
symbol `long', expecting `identifier'
/home/abeguin/Projects/TestFixed/Main.cs(22,1): error CS8025: Parsing error


Best regards.

-- 
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