diff options
-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; |