[Mono-bugs] [Bug 72957][Nor] New - mcs fails to compile long double constant

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 24 Feb 2005 05:27:42 -0500 (EST)


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 atsushi@ximian.com.

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

--- shadow/72957	2005-02-24 05:27:42.000000000 -0500
+++ shadow/72957.tmp.629	2005-02-24 05:27:42.000000000 -0500
@@ -0,0 +1,79 @@
+Bug#: 72957
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: atsushi@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs fails to compile long double constant
+
+Currently mcs cannot compile the example code below.
+
+It is manually folded, so join the numeric lines into one line.
+
+--------
+using System;
+
+public class Test
+{
+        public static void Main ()
+        {
+        double d = 0.0000000000000000000000000
+0000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000
+000000000000000000000222;
+        Console.Out.WriteLine (d.ToString ("R"));
+        Console.Out.WriteLine (d.ToString ());
+        }
+}
+
+
+Actual Results:
+$ mcs doubleround.cs
+doubleround.cs(7) error CS1021: Numeric constant too long
+doubleround.cs(7) error CS8025: Parsing error
+Compilation failed: 2 error(s), 0 warnings
+
+Expected Results:
+Compile without problem as csc does.
+
+How often does this happen? 
+consistently.
+
+Additional Information:
+
+Bug #72955 partly depends on this bug (I put the same code).
+The resulting code won't run fine with existing mscorlib/runtime.
+
+mono runtime does not complain against the example code below
+(folded again):
+
+using System;
+
+public class Test
+{
+        public static void Main ()
+        {
+                Double.Parse
+("0000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000
+000000000000000000222");
+        }
+}