Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb@sourceware.org
Subject: Re: symfile.h missing "#include "symtab.h" ?
Date: Wed, 21 Mar 2007 01:54:00 -0000	[thread overview]
Message-ID: <20070321015410.GA1382@caradoc.them.org> (raw)
In-Reply-To: <20070321004620.GD21799@adacore.com>

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


      reply	other threads:[~2007-03-21  1:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-21  0:45 Joel Brobecker
2007-03-21  1:54 ` Daniel Jacobowitz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070321015410.GA1382@caradoc.them.org \
    --to=drow@false.org \
    --cc=brobecker@adacore.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox