Re: Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang

2019-11-08 Thread Hans Åberg
> On 8 Nov 2019, at 18:26, Marco Bodrato wrote: > > Il Ven, 8 Novembre 2019 4:59 pm, Niels Möller ha scritto: >> Hans Åberg writes: >> >>> How about memory allocations? — There is info here, suggesting >>> uninitialized memory access in the test suite: > > Our priority is to avoid bugs in

Re: Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang

2019-11-08 Thread Marco Bodrato
Ciao, Il Ven, 8 Novembre 2019 4:59 pm, Niels Möller ha scritto: > Hans Åberg writes: > >> How about memory allocations? — There is info here, suggesting >> uninitialized memory access in the test suite: Our priority is to avoid bugs in the library. So that we usually pay more attention to the

Re: Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang

2019-11-08 Thread Niels Möller
Hans Åberg writes: > How about memory allocations? — There is info here, suggesting uninitialized > memory access in the test suite: > https://lists.llvm.org/pipermail/cfe-users/2019-November/001640.html That issue was fixed by Marco a month and a half ago, see

Re: Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang

2019-11-08 Thread Hans Åberg
> On 8 Nov 2019, at 15:48, Torbjörn Granlund wrote: > > There is info here, suggesting > uninitialized memory access in the test suite: > https://lists.llvm.org/pipermail/cfe-users/2019-November/001640.html > > What are you trying to contribute to the discussion in the Subject line? > >

Re: Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang

2019-11-08 Thread Torbjörn Granlund
Hans Åberg writes: > On 20 Oct 2019, at 22:14, Torbjörn Granlund wrote: > > Believe it or not, but the GMP devs are pretty good at computer > arithmetic. How about memory allocations? — There is info here, suggesting uninitialized memory access in the test suite:

Re: Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang

2019-11-08 Thread Hans Åberg
> On 20 Oct 2019, at 22:14, Torbjörn Granlund wrote: > > Believe it or not, but the GMP devs are pretty good at computer > arithmetic. How about memory allocations? — There is info here, suggesting uninitialized memory access in the test suite:

Re: Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang

2019-10-21 Thread Hans Åberg
> On 20 Oct 2019, at 22:14, Torbjörn Granlund wrote: > > Hans Åberg writes: > >> I believe we assume signed integers are in two's complement. > > Strictly, it is for signed overflows one cannot assume modulo 2^n, n = > number of bits. For the unsigned integer types it is required, >

Re: Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang

2019-10-20 Thread Hans Åberg
> On 20 Oct 2019, at 21:44, Torbjörn Granlund wrote: > > Hans Åberg writes: > > A common programming error is assuming that signed integer types are > two’s complement, because even though all current CPUs are that, > overflows are undefined in C/C++, and an optimizer can take advantage >

Re: Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang

2019-10-20 Thread Torbjörn Granlund
Hans Åberg writes: Strictly, it is for signed overflows one cannot assume modulo 2^n, n = number of bits. For the unsigned integer types it is required, though. Believe it or not, but the GMP devs are pretty good at computer arithmetic. -- Torbjörn Please encrypt, key id 0xC8601622

Re: Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang

2019-10-20 Thread Torbjörn Granlund
Hans Åberg writes: A common programming error is assuming that signed integer types are two’s complement, because even though all current CPUs are that, overflows are undefined in C/C++, and an optimizer can take advantage of that. One example from [1]: checking overflows with x > x + 1

Re: Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang

2019-10-20 Thread Hans Åberg
> On 20 Oct 2019, at 13:24, Torbjörn Granlund wrote: > > Hans Åberg writes: > > I have compiled gmp-6.1.2 on MacOS 10.15 using the inhouse Apple clang > and the MacPorts gcc9 and clang9, with ‘make check’. All tests passed > on gcc9, but the two clang had one error each. > > Several

Re: Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang

2019-10-20 Thread Torbjörn Granlund
Hans Åberg writes: I have compiled gmp-6.1.2 on MacOS 10.15 using the inhouse Apple clang and the MacPorts gcc9 and clang9, with ‘make check’. All tests passed on gcc9, but the two clang had one error each. Several people seem to have trouble with using clang. When clang first appeared,

Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang

2019-10-20 Thread Hans Åberg
I have compiled gmp-6.1.2 on MacOS 10.15 using the inhouse Apple clang and the MacPorts gcc9 and clang9, with ‘make check’. All tests passed on gcc9, but the two clang had one error each. % uname -a Darwin Kernel Version 19.0.0: Wed Sep 25 20:18:50 PDT 2019;