Owner: jie...@google.com

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 
Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to