Fix -Wstring-compare testcase build failure
Clang fails to compile the file gdb/testsuite/gdb.cp/try_catch.cc
with the following error:
warning: result of comparison against a string literal is
unspecified (use strncmp instead) [-Wstring-compare]
This commit fixes the error, replacing the pointer comparison with
a call to strcmp. This commit also adds a final check: the test
program is run to the final return statement, and the value of
"test" is checked to ensure it is still "true" at that point.
gdb/testsuite/ChangeLog:
* gdb.cp/try_catch.cc: Include string.h.
(main): Replace comparison against string literal with
strcmp, avoiding build failure with -Wstring-compare.
Add "marker test-complete".
* gdb.cp/try_catch.exp: Run the test to the above marker,
then verify that the value of "test" is still true.