From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6329 invoked by alias); 20 Dec 2010 09:04:24 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28539 Received: (qmail 2480 invoked from network); 20 Dec 2010 09:04:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at vinc17.org does not designate permitted sender hosts) Date: Mon, 20 Dec 2010 09:57:14 +0100 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: Re: PATCH: Errors compiling on HP-UX with HP's compiler Message-ID: <20101220085714.GX1727@prunille.vinc17.org> Mail-Followup-To: zsh-workers@zsh.org References: <20101220060037.GA14117@sverige> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20101220060037.GA14117@sverige> X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.21-6164-vl-r38670 (2010-10-13) On 2010-12-20 06:00:37 +0000, Paul Ackersviller wrote: > I must be using gcc more often than not to have just run across this. > HP's compiler, I think rightly, refuses to do arithmetic on these two > void pointers. Does gcc treat them as char * for that purpose? This is a well-known GCC extension: 5.21 Arithmetic on `void'- and Function-Pointers ================================================ In GNU C, addition and subtraction operations are supported on pointers to `void' and on pointers to functions. This is done by treating the size of a `void' or of a function as 1. A consequence of this is that `sizeof' is also allowed on `void' and on function types, and returns 1. The option `-Wpointer-arith' requests a warning if these extensions are used. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)