[Mono-bugs] [Bug 34597][Wis] New - problems with pp-expressions handling
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
25 Nov 2002 23:09:52 -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 avd@openlinksw.com.
http://bugzilla.ximian.com/show_bug.cgi?id=34597
--- shadow/34597 Mon Nov 25 18:09:52 2002
+++ shadow/34597.tmp.25046 Mon Nov 25 18:09:52 2002
@@ -0,0 +1,44 @@
+Bug#: 34597
+Product: Mono/MCS
+Version: unspecified
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: avd@openlinksw.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: problems with pp-expressions handling
+
+Description of Problem:
+
+There are problems compiling code with conditional compilation
+expressions containing || or && operators.
+
+Steps to reproduce the problem:
+
+mcs the folowing code:
+
+#if true || true
+#endif
+#if false && false
+#endif
+
+Actual Results:
+
+a.cs(2) error CS1517: Invalid pre-processor directive
+a.cs(4) error CS1517: Invalid pre-processor directive
+Compilation failed: 2 error(s), 0 warnings
+
+Additional Information:
+
+It looks like the errors occur in the Tokenizer.eval() method in the cc-
+tokenizer.cs file. It checks if after processing the expressions no more
+characters are left. But the pp_expr() and pp_and() methods short-
+circuit the expression evaluation and may leave some parts of it.