kayws426 / picoc

Automatically exported from code.google.com/p/picoc
0 stars 0 forks source link

return outside function body leads to crash #143

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. execute a 'return 0;' outside a function body.
2.
3.

What is the expected output? What do you see instead?
Should probably produce some sort of error message?
The result now is a program chrash (on line 746 in parse.c)

What version of the product are you using? On what operating system?
Latest from read-only SVN (October 21, 2011)

Please provide any additional information below.

Original issue reported on code.google.com by jjohans...@gmail.com on 21 Oct 2011 at 7:35

GoogleCodeExporter commented 9 years ago
Here's a fix. This will use the return value as exit code.

Original comment by broscuta...@gmail.com on 5 Mar 2013 at 6:40

Attachments:

GoogleCodeExporter commented 9 years ago
Patch applied in r593. Thanks very much.

Original comment by zik.sale...@gmail.com on 16 Mar 2013 at 5:46