public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@codesourcery.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: <gdb-patches@sourceware.org>, <binutils@sourceware.org>,
	Alan Modra	<amodra@gmail.com>,
	Hans-Peter Nilsson <hp@bitrange.com>,
	Tom Tromey	<tromey@redhat.com>
Subject: Re: [RFA v2] Make it easy to make --disable-werror the default for both binutils and gdb
Date: Wed, 04 Jun 2014 12:44:00 -0000	[thread overview]
Message-ID: <alpine.DEB.1.10.1406041337580.3047@tp.orcam.me.uk> (raw)
In-Reply-To: <1401811030-22706-1-git-send-email-brobecker@adacore.com>

On Tue, 3 Jun 2014, Joel Brobecker wrote:

> This is V2 of the patch series. Hopefully, I incorporated all comments
> made so far. The changes compared to the previous version are:
> 
>   . Use "-a" instead of "&&" in the test expression; (H-P)

 I think Hans-Peter's suggestion was the other way round, its "&&" that is 
portable while "-a" is likely not to work with non-GNU `test' or with 
plain Bourne shells (where it is a builtin).  This is what the autoconf 
manual has to say about it in its portability section:

`test'
     The `test' program is the way to perform many file and string
     tests.  It is often invoked by the alternate name `[', but using
     that name in Autoconf code is asking for trouble since it is an M4
     quote character.

     The `-a', `-o', `(', and `)' operands are not portable and should
     be avoided.  Thus, portable uses of `test' should never have more
     than four arguments, and scripts should use shell constructs like
     `&&' and `||' instead.  If you combine `&&' and `||' in the same
     statement, keep in mind that they have equal precedence, so it is
     often better to parenthesize even when this is redundant.  For
     example:

          # Not portable:
          test "X$a" = "X$b" -a \
            '(' "X$c" != "X$d" -o "X$e" = "X$f" ')'

          # Portable:
          test "X$a" = "X$b" &&
            { test "X$c" != "X$d" || test "X$e" = "X$f"; }

  Maciej

  parent reply	other threads:[~2014-06-04 12:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03 15:57 Joel Brobecker
2014-06-04  0:43 ` Alan Modra
2014-06-04 12:44 ` Maciej W. Rozycki [this message]
2014-06-04 12:55   ` Joel Brobecker
2014-06-04 17:43     ` Maciej W. Rozycki
2014-06-04 21:00 ` Tom Tromey
2014-06-05 12:55   ` Joel Brobecker

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=alpine.DEB.1.10.1406041337580.3047@tp.orcam.me.uk \
    --to=macro@codesourcery.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=hp@bitrange.com \
    --cc=tromey@redhat.com \
    /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: link
Be 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).