From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114292 invoked by alias); 27 Feb 2020 21:10:50 -0000 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 Received: (qmail 114279 invoked by uid 89); 27 Feb 2020 21:10:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=H*MI:sk:09b7ad5 X-HELO: mail-wr1-f46.google.com Received: from mail-wr1-f46.google.com (HELO mail-wr1-f46.google.com) (209.85.221.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 27 Feb 2020 21:10:48 +0000 Received: by mail-wr1-f46.google.com with SMTP id v2so469745wrp.12 for ; Thu, 27 Feb 2020 13:10:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=qCTN1Sv6lyuVBx7EhTQ/tx64fB9HDzYQO8SYucYAbeg=; b=COi9qmuSdbbEW693K10l+9Ud592yrDPgQv9YuqXPAumAEvyzyJif0ffv3+sIYDrLrw kX576mPP1GAwI8OcEnFFy+tj4+D+s0iUkCVztNwIQ/o7xvkElsgHuxSqzG+H+OlVfMTm H/3hWuOL4JbNNKQ9OG7nUd/lBB/7JiCoDlfHwjgJuEnPbofyJXNPq1ILWgIpUU8iIjIt t0nTVlrcWeVzae68+P+6dTN/WqK38x3IFnrNIvAv+spE9IMEQObpOWVJT2vZCBspD0Kq gTR+LUAUQgKc8Qr8mLSsqMxKb1YnZZfxWlLfDom4zV2IKk0BmohcSkAr4sV3ptqT3kzm Quqw== Return-Path: Received: from localhost (host86-186-80-160.range86-186.btcentralplus.com. [86.186.80.160]) by smtp.gmail.com with ESMTPSA id a26sm9199315wmm.18.2020.02.27.13.10.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Feb 2020 13:10:45 -0800 (PST) Date: Thu, 27 Feb 2020 21:10:00 -0000 From: Andrew Burgess To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PUSHED] gdb: Use std::abs instead of abs on LONGEST types Message-ID: <20200227211044.GN3317@embecosm.com> References: <20200227164651.13723-1-andrew.burgess@embecosm.com> <09b7ad54-6c4f-922e-9a72-9e3d26603aec@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <09b7ad54-6c4f-922e-9a72-9e3d26603aec@redhat.com> X-Fortune: "Help save the world!" -- Larry Wall in README X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg01027.txt.bz2 * Pedro Alves [2020-02-27 19:06:47 +0000]: > On 2/27/20 4:46 PM, Andrew Burgess wrote: > > Use std::abs so that we get the C++ overloaded version that matches > > the argument type instead of the C abs function which is only for int > > arguments. > > Note that stdlib.h/stdmath.h are supposed to provide the overloads in > the global namespace as well; the standard requires it. Older > GCCs got that wrong (e.g. 4.8), but more modern GCCs get it right. > > Just a FYI, the patch is fine. Thanks for looking at this. Thanks, Andrew > > > > > There should be no user visible change after this commit. > > > > gdb/ChangeLog: > > > > * gdbtypes.c (create_array_type_with_stride): Use std::abs not > > abs. > > Thanks, > Pedro Alves >