[Mono-bugs] [Bug 76566][Nor] New - #pragma disable 1718 does not work

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Oct 26 16:17:46 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 vargaz at gmail.com.

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

--- shadow/76566	2005-10-26 16:17:46.000000000 -0400
+++ shadow/76566.tmp.25861	2005-10-26 16:17:46.000000000 -0400
@@ -0,0 +1,44 @@
+Bug#: 76566
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: vargaz at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: #pragma disable 1718 does not work
+
+Test case:
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+
+public class Test {
+
+        static bool isnan (float f) {
+#pragma warning disable 1718
+                return f == f;
+#pragma warning restore
+        }
+
+        public static void Main(string[] args) {
+                isnan (1.0f);
+        }
+}
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+This compiles fine using net 2.0 csc. Under mono, it prints:
+
+bug.cs(8,1): warning CS1691: `1718' is not a valid warning number
+bug.cs(9,10): warning CS1718: Comparison made to same variable; did you
+mean to compare something else?
+Compilation succeeded - 2 warning(s)


More information about the mono-bugs mailing list