Comment #1 on issue 373 by van...@gmail.com: Tests hang/crash/don't pass without RTTI
http://code.google.com/p/protobuf/issues/detail?id=373

In fact, tests didn't even compile:

google/protobuf/extension_set_unittest.cc:618:67: error: "dynamic_cast" not permitted with -fno-rtti

I made the following change to fix compile error:

--- a/src/google/protobuf/extension_set_unittest.cc
+++ b/src/google/protobuf/extension_set_unittest.cc
@@ -615,7 +615,8 @@ TEST(ExtensionSetTest, DynamicExtensions) {
     const Message& sub_message =
         message.GetReflection()->GetMessage(message, message_extension);
     const unittest::ForeignMessage* typed_sub_message =
-        dynamic_cast<const unittest::ForeignMessage*>(&sub_message);
+        ::google::protobuf::internal::dynamic_cast_if_available
+        <const unittest::ForeignMessage*>(&sub_message);
     ASSERT_TRUE(typed_sub_message != NULL);
     EXPECT_EQ(456, typed_sub_message->c());
   }


Is GOOGLE_PROTOBUF_NO_RTTI supported at all?

--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to