[Mono-bugs] [Bug 75245][Wis] New - Newline in character literal should trigger CS1010 error

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Jun 13 02:05:15 EDT 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by brion at pobox.com.

http://bugzilla.ximian.com/show_bug.cgi?id=75245

--- shadow/75245	2005-06-13 02:05:15.000000000 -0400
+++ shadow/75245.tmp.13024	2005-06-13 02:05:15.000000000 -0400
@@ -0,0 +1,44 @@
+Bug#: 75245
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: Ubuntu Hoary x86
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: brion at pobox.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Newline in character literal should trigger CS1010 error
+
+Description of Problem:
+Newlines are forbidden in single-quoted character literals according to the
+spec (ECMA-344 9.4.4.4), but mcs accepts this construct.
+
+Steps to reproduce the problem:
+1. char x='
+';
+2. Save source file in Unix line-ending format.
+2. mcs foo.cs
+
+Actual Results:
+MCS compiles this without complaint.
+
+Expected Results:
+This should probably trigger a CS1010 'Newline in constant' error, as
+csc.exe in .NET 1.1 does.
+
+How often does this happen? 
+Every time.
+
+Additional Information:
+If the file is saved in DOS format, this will (also) trigger a CS1012 for
+having too many characters on both csc and mcs.
+
+Tested with Mono compiled from SVN a couple weeks ago on Linux, and Mono
+1.1.7 on Windows XP.


More information about the mono-bugs mailing list