From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10863 invoked by alias); 13 Aug 2014 17:42:32 -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 10826 invoked by uid 89); 13 Aug 2014 17:42:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 13 Aug 2014 17:42:26 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 8FD50116323; Wed, 13 Aug 2014 13:42:24 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 2bAJ2PaBfb34; Wed, 13 Aug 2014 13:42:24 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 66E7B116321; Wed, 13 Aug 2014 13:42:24 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 93263493BC; Wed, 13 Aug 2014 10:42:27 -0700 (PDT) Date: Wed, 13 Aug 2014 17:42:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: Yao Qi , gdb-patches@sourceware.org Subject: Re: Warnings in native MinGW32 build of GDB 7.8 Message-ID: <20140813174227.GF4881@adacore.com> References: <83r40plpp3.fsf@gnu.org> <53EAE47A.6030700@codesourcery.com> <83k36cifeq.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83k36cifeq.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-08/txt/msg00240.txt.bz2 > > > #include "defs.h" > > > +#include "target.h" /* for 'enum target_xfer_status' */ > > > > I can see enum target_xfer_status is used in this c file. This is good > > to me. > > Not sure what you mean here. Do you agree with this change? If not, > why not? I think Yao was agreeing with the patch. I agree with the change as well, so you can commit that part right away. > > > /* Dynamic target-system-dependent parameters for GDB. */ > > > +#include "frame.h" /* for 'struct frame_id' */ > > > > It is unclear to me why do we need this include? > > Because 'struct frame_id' is otherwise not defined, and I get warnings > like this one: > > In file included from defs.h:631, > from gdb.c:19: > gdbarch.h:429: warning: parameter has incomplete type > gdbarch.h:430: warning: parameter has incomplete type I think we should fix gdbarch.h to include frame.h instead, which effectively means adjusting gdbarch.sh. The solution you chose seems to be relying on an indirect include, which we really really try to avoid. Yao's question is a good example of one of the reasons why we avoid that; but there is also the fact that not everyone will need frame.h's declarations. > > > --- gdb/target-dcache.c~0 2014-06-11 19:34:41.000000000 +0300 > > > +++ gdb/target-dcache.c 2014-08-09 16:17:42.244875000 +0300 > > > @@ -16,6 +16,7 @@ > > > along with this program. If not, see . */ > > > > > > #include "defs.h" > > > +#include "target.h" /* for 'enum target_xfer_status' */ > > > > enum target_xfer_status isn't used in target-dcache.c. Do we really > > need this? > > It is used in dcache.h which target-dcache.c includes: > > In file included from target-dcache.h:21, > from target-dcache.c:19: > dcache.h:42: warning: parameter has incomplete type Same here, dcache.h should be the one including target.h. -- Joel