Comment #1 on issue 663 by jie...@google.com: Undefined behavior while
running unit tests
Yes our implementation used this undefined behavior.
Line 1103 -static_cast<int64>(value); tries to cast an uint64 to int64. If
the uint64 is 0x8000000000000000, we will have a minimum int64. Negation of
minimum negative value is an undefined behavior and compiler will "cast to
an unsigned type to negate this value to itself"
It reports undefined behavior because you used the detector. We prefer not
fix it unless there are some compilers which do not keep the value as it is
when "negation of the minimum negative"
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
You received this message because you are subscribed to the Google Groups "Protocol
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to firstname.lastname@example.org.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.