Skip to content

Use shift mask for shift operations with native integers #43347

@cston

Description

@cston

The shift operators for nint and nuint should mask the number of bits to shift - to 5 bits if sizeof(nint) is 4, and to 6 bits if sizeof(nint) is 8.

[jcouv:] When fixing this, we'll want to include a test for >>> as well (new feature added in meantime).

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status

Active/Investigating

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions