From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27423 invoked by alias); 16 Jan 2012 03:08:52 -0000 Received: (qmail 27414 invoked by uid 22791); 16 Jan 2012 03:08:51 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 Jan 2012 03:08:34 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0G38Y2A022974 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 15 Jan 2012 22:08:34 -0500 Received: from psique ([10.3.112.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q0G38THA019228; Sun, 15 Jan 2012 22:08:31 -0500 From: Sergio Durigan Junior To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [RFC 1/8] Language independent bits References: <20120115203420.GA18901@host2.jankratochvil.net> <20120115211725.GA4330@host2.jankratochvil.net> X-URL: http://www.redhat.com Date: Mon, 16 Jan 2012 12:32:00 -0000 In-Reply-To: <20120115211725.GA4330@host2.jankratochvil.net> (Jan Kratochvil's message of "Sun, 15 Jan 2012 22:17:25 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00539.txt.bz2 On Sunday, January 15 2012, Jan Kratochvil wrote: > On Sun, 15 Jan 2012 22:07:30 +0100, Sergio Durigan Junior wrote: >> >> + ps->expout = (struct expression *) >> >> + xmalloc (sizeof (struct expression) >> >> + + EXP_ELEM_TO_BYTES (ps->expout_size)); >> > >> > That return type cast is excessive. It had meaning for K&R C where xmalloc >> > returns PTR but that is no longer supported. There should be done >> > s/PTR/void */ everywhere and #define PTR should be removed >> > and #pragma GCC poison -ed. >> >> Sorry, I am not sure I understood your argument. > > I do not understand why you put that cast in. I didn't. This code already existed, and I just copied and pasted it. When I did that, I must confess that I did not notice the casting to struct expression, so thanks for catching it.