Fix -Wstring-compare testcase build failure
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.cp / try_catch.cc
index 4c4add26e638c16538f593881bd3a0f203cb3ffa..5f454f41ec5ff3f5febea8a910fc1288d9866298 100644 (file)
@@ -18,6 +18,7 @@
 #include <exception>
 #include <stdexcept>
 #include <string>
+#include <string.h>
 
 enum region { oriental, egyptian, greek, etruscan, roman };
 
@@ -129,8 +130,8 @@ int main()
     }
   catch (exception& obj)
     {
-      if (obj.what() != "gdb.1")       // marker 3-catch
+      if (strcmp (obj.what(), "gdb.1") != 0)   // marker 3-catch
        test &= false;
     }
-  return 0;
+  return 0;    // marker test-complete
 }
This page took 0.024574 seconds and 4 git commands to generate.