[Mono-bugs] [Bug 80325][Maj] New - Bug with mcs, gmcs nested preprocessor defines
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Dec 20 06:43:33 EST 2006
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 mr at marcelruff.info.
http://bugzilla.ximian.com/show_bug.cgi?id=80325
--- shadow/80325 2006-12-20 06:43:33.000000000 -0500
+++ shadow/80325.tmp.848 2006-12-20 06:43:33.000000000 -0500
@@ -0,0 +1,74 @@
+Bug#: 80325
+Product: Mono: Compilers
+Version: unspecified
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: mr at marcelruff.info
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Bug with mcs, gmcs nested preprocessor defines
+
+Description of Problem:
+Bug with mcs, gmcs nested preprocessor defines
+
+I have a little code snippet which does not return
+the expected output with mcs or gmcs.
+
+On Windows, with csc, it outputs correctly
+
+ PreBug.cs(6,1): warning CS1030: #warning: `A1'
+
+whereas with mcs/gmcs i get
+
+ PreBug.cs(6,1): warning CS1030: #warning: `A1'
+ PreBug.cs(13,1): warning CS1030: #warning: `A2->else'
+
+The second line (a nested define) i think is not correct,
+
+
+Steps to reproduce the problem:
+----------- PreBug.cs -----------
+/*
+mcs -warn:4 -define:A1 PreBug.cs
+
+//Mono C# compiler version 1.1.13.8 and 1.1.18.1
+PreBug.cs(6,1): warning CS1030: #warning: `A1'
+PreBug.cs(13,1): warning CS1030: #warning: `A2->else'
+*/
+
+#if A1
+# warning A1
+#elif A2
+# warning A2
+# if B2
+# warning A1->B2
+# define A1B2
+# else
+# warning A2->else
+# endif
+#else
+# warning else
+#endif
+----------- PreBug.cs -----------
+
+Actual Results:
+PreBug.cs(6,1): warning CS1030: #warning: `A1'
+PreBug.cs(13,1): warning CS1030: #warning: `A2->else'
+
+
+Expected Results:
+PreBug.cs(6,1): warning CS1030: #warning: `A1'
+
+How often does this happen?
+Is reproducable with given code snippet.
+
+Additional Information:
+Thank you!
More information about the mono-bugs
mailing list