From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9126 invoked by alias); 13 Aug 2014 03:05:16 -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 9113 invoked by uid 89); 13 Aug 2014 03:05:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vc0-f171.google.com Received: from mail-vc0-f171.google.com (HELO mail-vc0-f171.google.com) (209.85.220.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 13 Aug 2014 03:05:13 +0000 Received: by mail-vc0-f171.google.com with SMTP id hq11so14294311vcb.2 for ; Tue, 12 Aug 2014 20:05:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=UwL9N++Obv/Qo1AmzEKYDHsdqY6WkZ71/gELzIo6LFw=; b=KTVefnDTwyoQ7kNngv6KCyPAsCWoImnM1u3iXj+TT6yhPKEiEqDF28x9Ytb9hWfEwu zfsk+2YHRvInoRp5IDtqmbqmBt0o2QYI7WFmkFg8pK0pSFIYjjMib/QB36PjcKyFoLI0 xxfeajwhxwJL4Q2D+C1ioJj75bjjeILce73SzpgjP9TB+gtnUHofMQJ5+s56ZlHOXQ8g o7cSwjlrWZK/y8Al7GQ0LgV2Qo24YcgDqDlldMPBacUoHHtBZdnaujn+aEdyzdZTiOlH 5SfouPxO6YYJBx119Q8MQnJeJvJrmQ9amoS/kwfF7mxbwb9wJtMWm1LCW8S8g8qxcFsL 9YDw== X-Gm-Message-State: ALoCoQlNlUw9zQ5hyyfJVR0C7zwsrQTI11UjkwbrevXaqedXfdp1eIkIrsLO88NTVqZOwlsHhgi/ MIME-Version: 1.0 X-Received: by 10.52.148.2 with SMTP id to2mr1120896vdb.38.1407899111432; Tue, 12 Aug 2014 20:05:11 -0700 (PDT) Received: by 10.52.136.203 with HTTP; Tue, 12 Aug 2014 20:05:11 -0700 (PDT) In-Reply-To: <53EAC446.5060409@codesourcery.com> References: <20140804202907.GA2608@host2.jankratochvil.net> <53E17E14.8070104@codesourcery.com> <20140812192204.GA13299@host2.jankratochvil.net> <53EAC446.5060409@codesourcery.com> Date: Wed, 13 Aug 2014 03:05:00 -0000 Message-ID: Subject: Re: [patch+7.8?] Fix --with-babeltrace with gcc-4.9.1 From: Doug Evans To: Yao Qi Cc: Jan Kratochvil , gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00208.txt.bz2 On Tue, Aug 12, 2014 at 6:49 PM, Yao Qi wrote: > On 08/13/2014 04:32 AM, Doug Evans wrote: >> This seems like an excessive amount of code just to test whether a >> library exists. >> Do we really need all of it? > > IMO, it's better to keep them. When I use babeltrace in GDB, I find the > babeltrace APIs are not stable, so I put more code in the configure > test, to cover GDB usages. > >> E.g., can we just delete "pos" and the function call that initializes it? >> >> struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); >> >> Or, if for some reason we need to test whether bf_ctf_get_iter exists, >> can we just >> call it and discard the result? [And similarly for the rest of the code.] >> None of this code gets run anyways. > > As I said above, bt_iter_get_pos and bf_ctf_get_iter are here to test > they still exist in the babeltrace library. They are in 1.1.0, but I am > worried that they may be changed or renamed in the future. Thanks. I suspect it'll be useful to be able to refer to this reasoning at some point in the future. [ref: the "incompatible pointer type" warning is related to the assignment to scope, not pos]. Maybe this thread is sufficient, or maybe you could add something to the commit message. Patch is ok with me.