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


           Summary: Incorrect handling of invalid preprocessor directives.
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


Created an attachment (id=303749)
 --> (http://bugzilla.novell.com/attachment.cgi?id=303749)
test.cs

Attached test case shows a problem with mcs incorrectly handling invalid
preprocessor directives of the form:

#if DEBUG
 ...code...
# something not valid here
 ...code...
#endif

If DEBUG is not defined csc reports cs1024:

test.cs(9,3): error CS1024: Preprocessor directive expected

while mcs in that situation doesn't report any error and skips the entire block
between #if and #endif.

If DEBUG is defined, csc reports cs1024 and cs1025:

test.cs(9,3): error CS1024: Preprocessor directive expected
test.cs(9,13): error CS1025: Single-line comment or end-of-line expected

while mcs reports only cs1024:

test.cs(10,0): error CS1024: Wrong preprocessor directive

Note also that the (line, column) location is incorrect with mcs.

-- 
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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to