- ZScript: fixed integer type promotion for shift operator
* the first operand must never be sign-changed. * the second operand should always be made unsigned. Shift by negative values is undefined and may produce undefined behavior on some systems.
This commit is contained in:
parent
8eabaf61c9
commit
388a5cb481
2 changed files with 7 additions and 6 deletions
|
|
@ -910,7 +910,7 @@ public:
|
|||
|
||||
FxBinary(int, FxExpression*, FxExpression*);
|
||||
~FxBinary();
|
||||
bool Promote(FCompileContext &ctx, bool forceint = false);
|
||||
bool Promote(FCompileContext &ctx, bool forceint = false, bool shiftop = false);
|
||||
};
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue