From: Oleg Endo Date: Sat, 28 Sep 2019 08:33:31 +0000 (+0000) Subject: re PR target/80672 (gcc/config/sh/sh.c:716: prefer compare to find.) X-Git-Tag: upstream/12.2.0~21591 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2664bcb87601c9f77c61dea1583166c9dbb135a3;p=platform%2Fupstream%2Fgcc.git re PR target/80672 (gcc/config/sh/sh.c:716: prefer compare to find.) gcc/ 2019-09-28 Oleg Endo PR target/80672 * config/sh/sh.c (parse_validate_atomic_model_option): Use std::string::compare instead of std::string::find. From-SVN: r276240 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ae7c8dd..459fbe5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-09-28 Oleg Endo + + 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 * configure: Regenerate. diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index e3eea10..5c4598f 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -734,7 +734,7 @@ got_mode_name:; { if (tokens[i] == "strict") 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=")); ret.tcb_gbr_offset = integral_argument (offset_str.c_str ());