Commit 2664bcb8 by Oleg Endo

re PR target/80672 (gcc/config/sh/sh.c:716: prefer compare to find.)

gcc/
2019-09-28  Oleg Endo  <olegendo@gcc.gnu.org>

	PR target/80672
	* config/sh/sh.c (parse_validate_atomic_model_option): Use
	std::string::compare instead of std::string::find.

From-SVN: r276240
parent b1649990
2019-09-28 Oleg Endo <olegendo@gcc.gnu.org>
PR target/80672
* config/sh/sh.c (parse_validate_atomic_model_option): Use
std::string::compare instead of std::string::find.
2019-09-27 Maciej W. Rozycki <macro@wdc.com> 2019-09-27 Maciej W. Rozycki <macro@wdc.com>
* configure: Regenerate. * configure: Regenerate.
......
...@@ -734,7 +734,7 @@ got_mode_name:; ...@@ -734,7 +734,7 @@ got_mode_name:;
{ {
if (tokens[i] == "strict") if (tokens[i] == "strict")
ret.strict = true; ret.strict = true;
else if (tokens[i].find ("gbr-offset=") == 0) else if (!tokens[i].compare (0, strlen ("gbr-offset="), "gbr-offset="))
{ {
std::string offset_str = tokens[i].substr (strlen ("gbr-offset=")); std::string offset_str = tokens[i].substr (strlen ("gbr-offset="));
ret.tcb_gbr_offset = integral_argument (offset_str.c_str ()); ret.tcb_gbr_offset = integral_argument (offset_str.c_str ());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment