[Mono-bugs] [Bug 445303] New: #undef is ignored when -d option is used (i.e. precedence difference)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Nov 14 16:06:59 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=445303


           Summary: #undef is ignored when -d option is used (i.e.
                    precedence difference)
           Product: Mono: Compilers
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: atsushi at ximian.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


gmcs does not seem to handle #undef when corresponding condition is given by
the compiler option. csc takes inline #undef operation in higher precedence.

Compile and run the following example with: gmcs -d:X test.cs

----
#undef X

#if X
internal
#else
public
#endif
class Test
{
        public static void Main ()
        {
                new System.Xml.Serialization.XmlSerializer (typeof (Test));
        }
}
----

With csc: it runs successfully.
With gmcs:
Unhandled Exception: System.InvalidOperationException: There was an error
reflecting type 'Test'. ---> System.InvalidOperationException: Test is
inaccessible due to its protection level. Only public types can be processed

I found this issue during trying to implement some features in dblinq land.


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