mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-17 16:38:14 +03:00
10 lines
297 B
C
10 lines
297 B
C
bool Int_safe_MINUS_add(int x, int y, int* res) {
|
|
return __builtin_sadd_overflow(x, y, res);
|
|
}
|
|
bool Int_safe_MINUS_sub(int x, int y, int* res) {
|
|
return __builtin_ssub_overflow(x, y, res);
|
|
}
|
|
bool Int_safe_MINUS_mul(int x, int y, int* res) {
|
|
return __builtin_smul_overflow(x, y, res);
|
|
}
|