Boost logo

Boost :

Subject: Re: [boost] Current Guidance on Compiler Warnings?
From: Stephan T. Lavavej (stl_at_[hidden])
Date: 2018-11-29 23:24:25

Since this is very likely to be by design forever, I think you can skip filing a bug.


From: degski <degski_at_[hidden]>
Sent: Thursday, November 29, 2018 1:26 AM
To: Stephan T. Lavavej <stl_at_[hidden]>
Cc: boost <boost_at_[hidden]>
Subject: Re: [boost] Current Guidance on Compiler Warnings?

On Tue, 27 Nov 2018 at 22:26, Stephan T. Lavavej <stl_at_[hidden]<mailto:stl_at_[hidden]>> wrote:
> Interestingly [or maybe not so interestingly] MSVC (15.8/7) is the only compiler
> available there [on godbolt] that does NOT produce more optimal code for the
> signed integer case (at any optimization level) (STL are you listening).

I am listening, but I am not a compiler backend dev. :-)

I'll give the guys in the garden shed a shout [**hollering**].

I recommend filing a bug about the missed optimization opportunity through the C++ tab of Developer Community at> .

 Well, it's UB, so anything can happen, so, is it a bug? It surely misses an opportunity [one compiler just returns 1 on the first function and does absolutely nothing else]. Wrapping signed int's doesn't make much sense [and mixes hardware with software, but hey, that'll go away with C++20]. I'm sympathetic to the effort [of turning it [the UB] into something that at some level does make sense]. The problem in my view is that [exactly what you've said below] people depend on it and therefore start writing non-portable code, without even knowing it. That I think is bad. Is there a warning? I bet you clang-cl will make a mess of the code that works so well with MSVC.

Please confirm that you still want me to file a bug, iff yes, I'll do so.

“If something cannot go on forever, it will stop" - Herbert Stein

Boost list run by bdawes at, gregod at, cpdaniel at, john at