Comment #1 on issue 313 by liuj...@google.com: in c++ generated header,
has_FIELD will return random results if more than 32 optional fields
defined in single message
This should not happen. What platform are you using? Can you write a simple
deomo for this issue? Please upload the .proto and generated .pb.h in
We use an array of int32 for HAS_bit. The actually has_ bit is stored in
has_array[ (field_index) / 32]. The mask is 1u << (field_index % 32).
BTW, if you use x64 platform in MSVC professional, there was a bug about
generating the has bit mask. It's fixed in r402.
You received this message because you are subscribed to the Google Groups "Protocol
To post to this group, send email to email@example.com.
To unsubscribe from this group, send email to
For more options, visit this group at