Mercurial > hg > CbC > CbC_gcc
comparison gcc/d/dmd/root/checkedint.h @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 | |
2 /* Compiler implementation of the D programming language | |
3 * Copyright (C) 2003-2019 by The D Language Foundation, All Rights Reserved | |
4 * written by Walter Bright | |
5 * http://www.digitalmars.com | |
6 * Distributed under the Boost Software License, Version 1.0. | |
7 * http://www.boost.org/LICENSE_1_0.txt | |
8 * https://github.com/D-Programming-Language/dmd/blob/master/src/root/checkedint.h | |
9 */ | |
10 | |
11 #include "dsystem.h" | |
12 | |
13 | |
14 int adds(int x, int y, bool& overflow); | |
15 int64_t adds(int64_t x, int64_t y, bool& overflow); | |
16 unsigned addu(unsigned x, unsigned y, bool& overflow); | |
17 uint64_t addu(uint64_t x, uint64_t y, bool& overflow); | |
18 | |
19 int subs(int x, int y, bool& overflow); | |
20 int64_t subs(int64_t x, int64_t y, bool& overflow); | |
21 unsigned subu(unsigned x, unsigned y, bool& overflow); | |
22 uint64_t subu(uint64_t x, uint64_t y, bool& overflow); | |
23 | |
24 int negs(int x, bool& overflow); | |
25 int64_t negs(int64_t x, bool& overflow); | |
26 | |
27 int muls(int x, int y, bool& overflow); | |
28 int64_t muls(int64_t x, int64_t y, bool& overflow); | |
29 unsigned mulu(unsigned x, unsigned y, bool& overflow); | |
30 uint64_t mulu(uint64_t x, uint64_t y, bool& overflow); |