Skip to content

Commit 0e6544d

Browse files
committed
Add new intrinsics
1 parent c475bf7 commit 0e6544d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

proposals/unsigned/unsigned.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,17 @@ integers. We attempt to avoid these as follows:
197197
- MAXLOC(UNSIGNED array, ...), and MINLOC
198198
- MAXVAL(UNSIGNED array, ...), MINVAL
199199

200+
- Add the following new intrinsics (names to be decided):
201+
- ADD_WRAPPING(UNSIGNED, UNSIGNED) (or ADD_MODULAR) for modular
202+
arithmetics; the same for SUB, MUL, DIV
203+
204+
- We can consider also adding the following intrinsics:
205+
- Possibly add ADD_SATURATING: saturating at the numeric bounds
206+
instead of overflowing; the same for SUB, MUL, DIV
207+
- Possibly add ADD_OVERFLOWING (or ADD_CHECKED): indicates with a
208+
flag that overflow occurred, wrapped value is returned; the same
209+
for SUB, MUL, DIV
210+
200211
- Extend ISO_C_BINDING with KIND numbers, for example,
201212
C_UINT, C_UINT8_T.
202213

0 commit comments

Comments
 (0)