9 Commits

Author SHA1 Message Date
Christopher Warrington
960b9cfd19 Guard against min/max being macros in reader.h
Sometimes, particularly when Microsoft's windows.h is included, min/max
are defined as macros, interfering with use of
std::numeric_limits::min() and the like.

To guard against this, the function name is wrapped in an extra set of
parenthesis, which inhibits function-style macro expansion.

This is a similar commit to 6e38649ec6, but fixes uses of
std::numeric_limits added after that commit, like those introduced in
2ea43433e2.
2018-07-10 11:08:41 -07:00
Christopher Warrington
e4c0ecf86b Guard against min/max macros in tests too 2017-09-05 18:27:02 -07:00
Zhihao Yuan
3cc77d5d63
Treat signed-unsigned conversions as errors. 2017-01-18 18:09:18 -06:00
Eli Fidler
be1eedf808 avoid signed-integer overflow, which is undefined behavior
UBSAN gave for test/unittest/itoatest.cpp:87:
runtime error: signed integer overflow: 4611686018427387904 * 2 cannot be represented in type 'long'
2016-06-14 07:01:41 -07:00
Konstantin Trushin
305882489c do potentially precision-losing conversions explicitly 2016-03-13 14:07:39 +03:00
Milo Yip
74c8dcfd57 Fix clang -Weverything 2015-12-18 18:34:04 +08:00
miloyip
8d39282af5 Update license headers for tests 2015-04-18 21:41:38 +08:00
miloyip
affd2736c3 Fix gcc warning for itoatest 2015-04-13 15:22:26 +08:00
miloyip
e9b92256a2 Add itoatest 2015-04-13 15:11:32 +08:00