From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2497 invoked by alias); 21 Mar 2007 01:54:17 -0000 Received: (qmail 2360 invoked by uid 22791); 21 Mar 2007 01:54:16 -0000 X-Spam-Check-By: sourceware.org Received: from return.false.org (HELO return.false.org) (66.207.162.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 21 Mar 2007 01:54:12 +0000 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id 368A24B267; Tue, 20 Mar 2007 20:54:11 -0500 (CDT) Received: from caradoc.them.org (dsl093-172-095.pit1.dsl.speakeasy.net [66.93.172.95]) by return.false.org (Postfix) with ESMTP id 0AA834B262; Tue, 20 Mar 2007 20:54:10 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1HTq1i-0000O6-5i; Tue, 20 Mar 2007 21:54:10 -0400 Date: Wed, 21 Mar 2007 01:54:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: gdb@sourceware.org Subject: Re: symfile.h missing "#include "symtab.h" ? Message-ID: <20070321015410.GA1382@caradoc.them.org> Mail-Followup-To: Joel Brobecker , gdb@sourceware.org References: <20070321004620.GD21799@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070321004620.GD21799@adacore.com> User-Agent: Mutt/1.5.14+cvs20070313 (2007-03-13) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-03/txt/msg00237.txt.bz2 On Tue, Mar 20, 2007 at 05:46:20PM -0700, Joel Brobecker wrote: > Hello, > > I noticed this today: If I include symfile.h without including > symtab.h first, I get a compilation error because domain_enum > is not defined. Yes, I noticed this before but never got around to fixing it. Sorry. > I was about to send a patch to add the missing include, but then > noticed: > > /* This file requires that you first include "bfd.h". */ > > Is this something we're intending to keep? Shouldn't we just > add the "#include "bfd.h" in that file? If not, then should we > treat "symtab.h" the same way? bfd.h, as it happens, is special - because it's included by defs.h. Other headers generally require that. I don't think there should be exceptions for other header dependencies, though. So please fix it! We try to use forward declarations instead of #include where possible, but of course that doesn't work for an enum. -- Daniel Jacobowitz CodeSourcery