This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: GDB's #include file policy revisited
- To: Mark Kettenis <kettenis at wins dot uva dot nl>
- Subject: Re: GDB's #include file policy revisited
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Fri, 07 Sep 2001 13:16:50 -0400
- Cc: gdb at sources dot redhat dot com
- References: <200109071131.f87BVlp09896@delius.kettenis.local>
>>From the intefnals manual:
i take it you ment infernals :-)
>
> With the exception of the global definitions supplied by `defs.h', a
> header file should explictily include the header declaring any
> `typedefs' et.al. it refers to.
>
> The header `gdbtypes.h' uses `struct block *' in a few function
> prototypes, which isn't declared in the file itself. The rule above
> seems to suggest that we should include `symtab.h'. Alternatively, we
> could simply use a forward declaration for `struct block *' in
> `gdbtypes.h'. That would avoid dragging in a lot of unecessary
> cruft. Some of the `tm.h' headers already do something like that, see
> for example `config/i386/tm-i386.h'. Do people agree that this is the
> right thing to do? Should I submit a patch for the internals manual
> to turn this into an official policy?
just adding:
struct block;
was the intent, but it doesn't say that :-/
andrew