[Mono-bugs] [Bug 22562] New - #define's accepted after first token in file
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
26 Mar 2002 20:55:13 -0000
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 duco@lorentz.xs4all.nl.
http://bugzilla.ximian.com/show_bug.cgi?id=22562
--- shadow/22562 Tue Mar 26 15:55:13 2002
+++ shadow/22562.tmp.30988 Tue Mar 26 15:55:13 2002
@@ -0,0 +1,49 @@
+Bug#: 22562
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details: SuSE Linux 7.1
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: duco@lorentz.xs4all.nl
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: #define's accepted after first token in file
+
+Description of Problem:
+C# syntax does not allow for #define after first "real" token in a file.
+mcs doesn't catch this.
+
+Steps to reproduce the problem:
+1. compile the following:
+
+namespace Test {
+
+public class Test {
+
+// #define should not be allowed after first token in file
+// csc yields error CS1032 on the following line, mcs accepts this file
+#define ILLEGALSYMBOL
+
+ public static void Main ()
+ {
+ Console.WriteLine ("hello");
+ }
+}
+
+
+
+Actual Results:
+The file is accepted by mcs and an executable is generated
+
+Expected Results:
+A syntax error (csc gives error CS1032 when compiling the example above.)
+
+How often does this happen?
+Always