aseba-community/aseba — pull request #253 by vaussard (2013-10-23 13:17:20+00:00)
Title: Bug fix/for 1.4 v2

This is the second version of my pull request.

Changes from v1 (see #252):
* Replace the goto by a self-recursion

---

Fix issue #245, add unit tests for this case, and fix some compilation warnings.

The patches for issue #245 introduce quite some big changes when dealing with literals. This is why I propose to push them to master, and to not backport these changes to the stable branch.

Some work would be required to also properly check overflow with constants. The best approach would be to implement a preprocessing pass, before the parser. But this is a bit less urgent. We could also check for overflow when performing optimization on literals. For example:

var i = 32767 + 1

will overflow, but is not caught as each literal is inside the s16 bounds.