From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 122291 invoked by alias); 27 Feb 2020 19:09: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 122256 invoked by uid 89); 27 Feb 2020 19:09:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.0 required=5.0 tests=AWL,BAYES_00,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=ham version=3.3.1 spammy=H*MI:sk:CAPTJ0X, H*f:sk:09b7ad5, HX-Received:c78e, H*i:sk:09b7ad5 X-HELO: mail-oi1-f173.google.com Received: from mail-oi1-f173.google.com (HELO mail-oi1-f173.google.com) (209.85.167.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 27 Feb 2020 19:09:48 +0000 Received: by mail-oi1-f173.google.com with SMTP id a142so307502oii.7 for ; Thu, 27 Feb 2020 11:09:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=a51UkUTpt2Z37x2nnXy7+l/0VZBa6ZqMMLzaUMTuwEw=; b=NW8Pg8B3hrQmPmjRVA1NS3ysaCtoPy2JklmEHtOm77dBpiBUAC0OC5QFjb2LYs7Sfj r7hYTeiItZKpavm5MO2mUEoXVUnW4j2zSijI9xlU8W6l/TYwqeZn0S0oBj0/lEPLsYtn xcCJnQEuoIIeLueTOH9pF8bcgch6e0IOyzKwltkFysGVVqHiF9oOP7nrVkIXVZmDkErs BMSVomRvTsd2Qk6ptgFmfIrJkHTkVTaAvfElVMb+FmisRMSFTm3I87cgqaTyDNySb4xX 0UYF4WUTZXVrpABJJ0J5CU/iJ+OvBj95e7CzJ1Orv0NrZoDs46wzVCZ5i+SRSRcGZjpI hzrQ== MIME-Version: 1.0 References: <20200227164651.13723-1-andrew.burgess@embecosm.com> <09b7ad54-6c4f-922e-9a72-9e3d26603aec@redhat.com> In-Reply-To: <09b7ad54-6c4f-922e-9a72-9e3d26603aec@redhat.com> From: "Christian Biesinger via gdb-patches" Reply-To: Christian Biesinger Date: Thu, 27 Feb 2020 19:09:00 -0000 Message-ID: Subject: Re: [PUSHED] gdb: Use std::abs instead of abs on LONGEST types To: Pedro Alves Cc: Andrew Burgess , gdb-patches Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg01019.txt.bz2 On Thu, Feb 27, 2020 at 1:07 PM Pedro Alves wrote: > > 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. Hm... I saw a build error from this on arm-netbsd with clang 9, I wonder what happened there. Anyway, the patch does fix it. Christian > > > > > 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 >