public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-1800] libgo: use POSIX shell arithmetic expansion Date: Fri, 22 Jul 2022 18:57:29 +0000 (GMT) [thread overview] Message-ID: <20220722185729.3D28A3858295@sourceware.org> (raw) https://gcc.gnu.org/g:cf1725610526fe347d2530455b32affc033fd7fc commit r13-1800-gcf1725610526fe347d2530455b32affc033fd7fc Author: Ian Lance Taylor <iant@golang.org> Date: Fri Jul 22 11:38:20 2022 -0700 libgo: use POSIX shell arithmetic expansion Avoid bash-specific ((expression)) syntax. As the bash syntax converts a non-zero value to a zero status (and a zero value to a 1 status), and POSIX arithmetic expansion does not, we have to negate the result. Based on patch by Sören Tempel. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/419154 Diff: --- gcc/go/gofrontend/MERGE | 2 +- libgo/match.sh | 2 +- libgo/testsuite/gotest | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 5ea0406cd8e..2f2fafde1f1 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -ff68b1a147eb60082fd60c198db0ef5477ade938 +a62f20ae78ddd41be682dde8cab075ca4f5dbb2a The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/match.sh b/libgo/match.sh index 7ed587ff794..e5ed98de422 100755 --- a/libgo/match.sh +++ b/libgo/match.sh @@ -111,7 +111,7 @@ gobuild() { if test "$goarch" != "386"; then line=$(echo "$line" | sed -e "s/\\(${wrap}\\)386\\(${wrap}\\)/\10\2/g") fi - (($line)) + return $((!($line))) } matched= diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest index 04e4267fbba..0a0a7e14d74 100755 --- a/libgo/testsuite/gotest +++ b/libgo/testsuite/gotest @@ -302,7 +302,7 @@ gobuild() { if test "$goarch" != "386"; then line=$(echo "$line" | sed -e "s/\\(${wrap}\\)386\\(${wrap}\\)/\10\2/g") fi - (($line)) + return $((!($line))) } case "x$gofiles" in
reply other threads:[~2022-07-22 18:57 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220722185729.3D28A3858295@sourceware.org \ --to=ian@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).