From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3189 invoked by alias); 4 Jun 2014 12:44:49 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 3169 invoked by uid 89); 4 Jun 2014 12:44:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 04 Jun 2014 12:44:47 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1WsAYc-00008W-Ac from Maciej_Rozycki@mentor.com ; Wed, 04 Jun 2014 05:44:42 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 4 Jun 2014 05:44:42 -0700 Received: from localhost (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server (TLS) id 14.2.247.3; Wed, 4 Jun 2014 13:44:40 +0100 Date: Wed, 04 Jun 2014 12:44:00 -0000 From: "Maciej W. Rozycki" To: Joel Brobecker CC: , , Alan Modra , Hans-Peter Nilsson , Tom Tromey Subject: Re: [RFA v2] Make it easy to make --disable-werror the default for both binutils and gdb In-Reply-To: <1401811030-22706-1-git-send-email-brobecker@adacore.com> Message-ID: References: <1401811030-22706-1-git-send-email-brobecker@adacore.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2014-06/txt/msg00036.txt.bz2 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