mail-archives/mono-bugs/2003-March/004209.html

115 строки
3.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-bugs] [Bug 39828][Nor] New - Individual switch-sections treated as blocks by mcs
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:bugzilla-daemon%40rocky.ximian.com">
<META NAME="robots" CONTENT="index,nofollow">
<LINK REL="Previous" HREF="004207.html">
<LINK REL="Next" HREF="004210.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-bugs] [Bug 39828][Nor] New - Individual switch-sections treated as blocks by mcs
</H1>
<B>bugzilla-daemon@rocky.ximian.com
</B>
<A HREF="mailto:bugzilla-daemon%40rocky.ximian.com"
TITLE="[Mono-bugs] [Bug 39828][Nor] New - Individual switch-sections treated as blocks by mcs">bugzilla-daemon@rocky.ximian.com
</A><BR>
<I>Mon, 17 Mar 2003 06:17:34 -0500 (EST)</I>
<P><UL>
<LI> Previous message: <A HREF="004207.html">[Mono-bugs] Ain't life grand 9863cecL7-114fFSZ4692siSa5-872Pi-30
</A></li>
<LI> Next message: <A HREF="004210.html">[Mono-bugs] [Bug 39830][Min] New - DbDataAdapter column naming
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#4209">[ date ]</a>
<a href="thread.html#4209">[ thread ]</a>
<a href="subject.html#4209">[ subject ]</a>
<a href="author.html#4209">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>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 <A HREF="mailto:kokholm@it-c.dk.">kokholm@it-c.dk.</A>
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=39828">http://bugzilla.ximian.com/show_bug.cgi?id=39828</A>
--- shadow/39828 Mon Mar 17 06:17:34 2003
+++ shadow/39828.tmp.19546 Mon Mar 17 06:17:34 2003
@@ -0,0 +1,51 @@
+Bug#: 39828
+Product: Mono/MCS
+Version: unspecified
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: <A HREF="mailto:mono-bugs@ximian.com">mono-bugs@ximian.com</A>
+ReportedBy: <A HREF="mailto:kokholm@it-c.dk">kokholm@it-c.dk</A>
+QAContact: <A HREF="mailto:mono-bugs@ximian.com">mono-bugs@ximian.com</A>
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Individual switch-sections treated as blocks by mcs
+
+mcs version 0.23 does not allow goto from one switch-section
+to a label in another switch-section in the same switch-block.
+It seems that the parser treats each switch-section as an
+individual block.
+
+The program below compiles correctly under the MS .NET Framework
+SDK csc and produces the expected output
+1
+4
+
+Under mcs 0.23 the compiler complains that
+Error.cs(8) error CS0159: No such label `LBL4' in this scope
+Compilation failed: 1 error(s), 0 warnings
+
+-------------------------snip----------------------------------
+class Error {
+ public static void Main() {
+ int i = 1;
+ switch (i) {
+ case 1:
+ System.Console.WriteLine(&quot;1&quot;);
+ if (i&gt;0)
+ goto LBL4;
+ System.Console.WriteLine(&quot;2&quot;);
+ break;
+ case 3:
+ System.Console.WriteLine(&quot;3&quot;);
+ LBL4:
+ System.Console.WriteLine(&quot;4&quot;);
+ break;
+ }
+ }
+}
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI> Previous message: <A HREF="004207.html">[Mono-bugs] Ain't life grand 9863cecL7-114fFSZ4692siSa5-872Pi-30
</A></li>
<LI> Next message: <A HREF="004210.html">[Mono-bugs] [Bug 39830][Min] New - DbDataAdapter column naming
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#4209">[ date ]</a>
<a href="thread.html#4209">[ thread ]</a>
<a href="subject.html#4209">[ subject ]</a>
<a href="author.html#4209">[ author ]</a>
</LI>
</UL>
</body></html>