This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, On 01/12/2017 15:11, Jonathan Wakely wrote:
Many details can be found in c++/52119. Which should probably be updated, right?On 01/12/17 14:02 +0000, Jonathan Wakely wrote:Is there a reason we left-shift into the sign bit, causing undefined behaviour? The approach used in std::numeric_limits seems better.The current code warns with -Wpedantic -Wsystem-headers:/usr/include/c++/7/ext/numeric_traits.h:58:35: warning: overflow in implicit constant conversion [-Woverflow]static const _Value __min = __glibcxx_min(_Value); ^~~~~~~~~~~~~
At the time I handled the libstdc++ side of the issue, and for some reason forgot to fix at the same time the ext/numeric_traits bits. I have no idea why, maybe to be conservative, in a way.
Paolo.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |