[Mono-list] Problem with while loop and Main returning void
Miguel de Icaza
miguel@ximian.com
03 Jul 2002 13:21:12 -0400
Hello!
> On 07/03/02 Leigh Dyer wrote:
> > I think I've found a minor bug in either mcs or the runtime. I was
> > writing a small app that has just has a Main() and a small while(true)
> > loop, with a break condition inside it. However, when I compiled my app
> > with mcs and ran it with mono, after breaking out of the while(true)
> > loop my program kept running - it seems to just keep re-running Main().
> > Running with mint exits at the end of the first run, but with a
> > "Trace/breakpoint trap" message.
> >
> > However, if I change my Main() so that it returns int instead of void,
> > and add a "return 0;" to the end, everything works as expected.
>
> I filed the report http://bugzilla.ximian.com/show_bug.cgi?id=26506
> a few days ago about this same issue: it's a mcs bug.
Thanks for spotting this case, and the documentation for it. It is
indeed an mcs bug, I will be fixing it shortly.
Miguel