diff options
author | Håvard Pettersen <havardpe@yahooinc.com> | 2022-06-22 14:30:44 +0000 |
---|---|---|
committer | Håvard Pettersen <havardpe@yahooinc.com> | 2022-06-22 14:30:44 +0000 |
commit | e67bfd93f1cff7eedcc64dfc7b62cc771dd7bcd9 (patch) | |
tree | 8adaeadff589fcc2cc5ac483da6a067447d8f7bf | |
parent | 1dd2e8b25d4b093eee6a9899c4da2625b2cdb863 (diff) |
add comment
-rw-r--r-- | vespalib/src/vespa/vespalib/stllike/asciistream.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vespalib/src/vespa/vespalib/stllike/asciistream.cpp b/vespalib/src/vespa/vespalib/stllike/asciistream.cpp index c8ff6f4dd4b..caacec196bd 100644 --- a/vespalib/src/vespa/vespalib/stllike/asciistream.cpp +++ b/vespalib/src/vespa/vespalib/stllike/asciistream.cpp @@ -433,6 +433,8 @@ unsigned long long normalize(long long v, bool &negative) { if (v < 0) { negative = true; if (v == std::numeric_limits<long long>::min()) { + // according to UBSAN: + // negation of -9223372036854775808 cannot be represented in type 'long long int'; cast to an unsigned type to negate this value to itself return v; } return -v; |