HaxeFoundation / HaxeFoundation/haxe

[cpp] Inconsistent overflow behavior for Int32

Open
#10,780 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

The problem is only with cpp target when test via Github actions ( https://github.com/HaxeFoundation/haxe/runs/7947619714?check_suite_focus=true#step:12:2762 ) . It's not possible to repeat it on my PC.
Here is the code
```haxe
var x:Int32 = 257 * 0x01010101; // 257 * 16843009
```

The result in hex is "0001 0202 0201" which should be "0202 0201" ( correct for all target except cpp)
Cpp target return "FFFF 8000 0000"

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.