Subject: Re: [boost] Current Guidance on Compiler Warnings?
From: Daniela Engert (dani_at_[hidden])
Date: 2018-11-28 16:34:20
Am 27.11.2018 um 21:02 schrieb Emil Dotchevski via Boost:
> On Tue, Nov 27, 2018 at 11:14 AM Daniela Engert via Boost <
> boost_at_[hidden]> wrote:
>> If only there were a signed integral
>> type with modulo arithmetic in C++. In other words: the raw underlying
>> hardware implementation without the UB semantics demanded by C++.
> The result would be:
> 1) Compilers would generate less optimal code, as demonstrated by this
> 2) You will still get a mathematically incorrect result most of the time.
Did you actually bother to think about my proposal? I don't want to take
away 'int' (as it is specified in the language). I want an *additional*
signed integral type with a sane mathematical definition: an abelian
group with modulus. And it should offer a widening multiplication N * N
-> 2N in addition to the regular one N * N -> N. The compiler should
know about this type and lower it's operations to the corresponding
hardware instruction (in most cases a single one).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk