Skip to content

Operators should be exposed for System.IntPtr and System.UIntPtr #17971

@tannergooding

Description

@tannergooding

Issue:
The CLR supports a set of operators for the System.IntPtr and System.UIntPtr types (native int). These operators can be seen in III.1.5 of the Command Language Infrastructure specification. However, these operators are not supported by some languages (such as C#).

Workaround:
Either directly emit IL or write non-optimal code that does not directly translate to the appropriate IL instructions.

Request::
A set of 'friendly operators' should be provided for languages that do not support the full set of operators for System.IntPtr and System.UIntPtr. These operators are: Add, Divide, Multiply, Remainder, Subtract, Negate, Equals, Compare, And, Not, Or, XOr, ShiftLeft, ShiftRight.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-needs-workAPI needs work before it is approved, it is NOT ready for implementationarea-System.Runtimehelp wanted[up-for-grabs] Good issue for external contributors

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions