[Mono-bugs] [Bug 520151] New: Incorrect handling of invalid preprocessor directives.
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Jul 8 07:24:36 EDT 2009
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: mono-bugs at lists.ximian.com
ReportedBy: mhabersack at novell.com
QAContact: mono-bugs at lists.ximian.com
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.
More information about the mono-bugs
mailing list