From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26361 invoked by alias); 6 Oct 2004 16:29:51 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 26354 invoked from network); 6 Oct 2004 16:29:50 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 6 Oct 2004 16:29:50 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i96GTjkS008614 for ; Wed, 6 Oct 2004 12:29:45 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i96GTdr31313; Wed, 6 Oct 2004 12:29:39 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id EF33228D2; Wed, 6 Oct 2004 12:29:22 -0400 (EDT) Message-ID: <41641D62.4030805@gnu.org> Date: Wed, 06 Oct 2004 16:29:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040831 MIME-Version: 1.0 To: Paul Hilfinger Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA]: Remove warnings from ada-exp.tab.c compilation References: <20041005103727.938AEF2BD3@nile.gnat.com> <4162FA1F.2030207@gnu.org> <20041006094738.A6034F2C9D@nile.gnat.com> In-Reply-To: <20041006094738.A6034F2C9D@nile.gnat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg00117.txt.bz2 >>> PS: >>> + tempbuf = (char *) realloc (tempbuf, tempbufsize); >>> the cast is redundant - realloc returns (void *). > > > Yeah, well, call it a personal quirk, call it an act of rebellion. > But when I see an ISO standard that tells me I don't need this conversion > by saying that > > "A pointer to void shall have the same representation and > alignment requirements as a pointer to a character type." > > and then tells me IN A FOOTNOTE that > > "The same representation and alignment requirements are meant to > imply interchangeability as arguments to functions, return values > from functions, and members of unions." > > the horror I feel at this shameless confusion of abstraction layers is such > that I feel compelled to ignore the passages altogether (:->). You could make up something like an XREALLOC macro (XCREALLOC?) to go with XMALLOC et.al. That might be needed anyway as while a C compiler doesn't require the cast, a C++ one does. whichever, Andrew