Re: [cfe-users] Clang9 UBSan and GMP

2019-10-30 Thread David Blaikie via cfe-users
I ran the test & understand it a bit better now - so the abort is part of the code, when the test fails, the test harness uses abort to fail. So this isn't "clang causes abort" (it didn't select a bad instruction, etc) this is "clang causes test failure" - this could be any number of things in ter

Re: [cfe-users] Clang9 UBSan and GMP

2019-10-30 Thread David Blaikie via cfe-users
On Wed, Oct 30, 2019 at 2:29 PM Hans Åberg wrote: > Indeed, very hard to figure out. If it is some hidden undefined behavior > causing it, the UBSan should have caught it, but it does not. Right - but especially with numerics (especially floating point) there's loads of room for valid but diffe

Re: [cfe-users] Clang9 UBSan and GMP

2019-10-30 Thread David Blaikie via cfe-users
On Wed, Oct 30, 2019 at 4:25 PM Hans Åberg wrote: > > > On 30 Oct 2019, at 23:50, David Blaikie wrote: > > > >> On Wed, Oct 30, 2019 at 2:29 PM Hans Åberg wrote: > >> Indeed, very hard to figure out. If it is some hidden undefined > behavior causing it, the UBSan should have caught it, but it d

Re: [cfe-users] Clang9 UBSan and GMP

2019-10-30 Thread David Blaikie via cfe-users
On Wed, Oct 30, 2019 at 5:36 PM Hans Åberg wrote: > > > > On 31 Oct 2019, at 00:28, David Blaikie wrote: > > > > > > > > On Wed, Oct 30, 2019 at 4:25 PM Hans Åberg wrote: > > > >> I believe that GMP is just using integer types, and then uses that to > make multiprecision integers, rational numb

Re: [cfe-users] clang-tidy bug?

2019-10-30 Thread David Blaikie via cfe-users
Two separate issues here 1) the fixit hint, as one of a set of alternatives, isn't likely to be removed/changed - the (albeit quirky) convention of using extra () to indicate an intentional assignment in a condition has been around for a while. So if you use the extra parens without writing an ass