From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74877 invoked by alias); 18 May 2017 11:30:47 -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 63459 invoked by uid 89); 18 May 2017 11:30:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=thatd, that'd, 5.3 X-HELO: mail-pg0-f45.google.com Received: from mail-pg0-f45.google.com (HELO mail-pg0-f45.google.com) (74.125.83.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 18 May 2017 11:30:35 +0000 Received: by mail-pg0-f45.google.com with SMTP id u28so21578649pgn.1 for ; Thu, 18 May 2017 04:30:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=0XORyyfvrMUrzZWnQePkRRVeTlWFuz7kQLKVmMhLIfE=; b=b3/pPCvMhj6HiznRbx40HUaF1yc4hstugA0BXLhtxVW8wvL0BDBWuTa3rTgntZ1RPx wnDrRa0fCDmdiLU7xdVrLIqCsw2UldoTUgePcssRrmhGhKCBxsm7NW6znG0DhkMcAxVx lkIa6Htlmh8FOm62PvVB/U8bdWwICrzorehhCRTn21ngEOLqBtZor7rxn3jB29R1hkms qRIdyUu+8cKEWMWJODSt+5aJq+Cj3iZIKFTYm0FcybOF1dItKtrGhkRh9J+16LX61dCh lW2e7x4rNBz5QjPqE/3GIxxzdGenAIEw6qOApk9fkPVItSre0N76UIeXc8bH89xP9qnY a1QA== X-Gm-Message-State: AODbwcDHbO7n1JtZrFO8cRQOSjfRlYNomun76bPnJ9yO+uWTDxRV4sGV +ZohoFSB4/j0FA== X-Received: by 10.98.15.23 with SMTP id x23mr3931920pfi.86.1495107037266; Thu, 18 May 2017 04:30:37 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id t79sm4450411pfk.106.2017.05.18.04.30.35 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 18 May 2017 04:30:36 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH OBV] Add nowarnings in gdb.base/fileio.exp References: <1495028758-13982-1-git-send-email-yao.qi@linaro.org> <684aa647-c1f4-e0cb-c4d5-04bd55463e20@redhat.com> <86fug28sxu.fsf@gmail.com> <9eedfbd7-9f36-2fe4-7a13-00e0b2261629@redhat.com> Date: Thu, 18 May 2017 11:30:00 -0000 In-Reply-To: <9eedfbd7-9f36-2fe4-7a13-00e0b2261629@redhat.com> (Pedro Alves's message of "Thu, 18 May 2017 12:06:09 +0100") Message-ID: <8637c28krq.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00417.txt.bz2 Pedro Alves writes: > I don't think so. I think that'd be the equivalent of saying that we > don't support debugging target code built with gcc versions earlier > than 4.6. That's a totally different discussion from the discussion > about requirements for building gdb. That is what I meant by "require gcc 4.6 to run testsuite". If we use such diagnostic in tests, we need gcc 4.6 or later to compile gdb test cases. > How about an even simpler fix: pass a global pointer variable that > happens to be NULL to stat, instead of a NULL literal. The compiler can't > prove (without LTO) that the variable may still be NULL, so it doesn't > warn. Works on all compilers I tried it on: gcc 3.4/5.3/7, clang 3.7. > > Let me send a mini series in reply to this email, which does that, > and also fixes a few other warnings that compiling the fileio.c with > -Wall exposes. These three patches are good to me. --=20 Yao (=E9=BD=90=E5=B0=A7)