Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* GDB's #include file policy revisited
@ 2001-09-07  4:31 Mark Kettenis
  2001-09-07 10:16 ` Andrew Cagney
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Kettenis @ 2001-09-07  4:31 UTC (permalink / raw)
  To: gdb

From the intefnals manual:

      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?

Mark



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-09-07 10:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-07  4:31 GDB's #include file policy revisited Mark Kettenis
2001-09-07 10:16 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox