llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[flang] Add UNSIGNED

Open klausler opened this issue 4 months ago • 4 comments

Implement the UNSIGNED extension type and operations under control of a language feature flag (-funsigned).

This is nearly identical to the UNSIGNED feature that has been available in Sun Fortran for years, and now implemented in GNU Fortran for gfortran 15, and proposed for ISO standardization in J3/24-116.txt.

See the new documentation for details; but in short, this is C's unsigned type, with guaranteed modular arithmetic for +, -, and *, and the related transformational intrinsic functions SUM & al.

More tests to come.

klausler avatar Oct 23 '24 23:10 klausler