[Mono-list] Problem with while loop and Main returning void

Paolo Molaro lupus@ximian.com
Wed, 3 Jul 2002 10:47:54 +0200


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.

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better