Mentions légales du service

Skip to content

Bug fix/for 1.4 v2

SHERMAN David requested to merge github/fork/vaussard/bug-fix/for-1.4-v2 into master

Created by: vaussard

This is the second version of my pull request.

Changes from v1 (see #252):

  • Replace the goto by a self-recursion

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

The patches for issue #245 (closed) 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.

Merge request reports