Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [commit] remove opaque enum declaration in symtab.h
@ 2007-12-19 13:30 Joel Brobecker
  2007-12-19 14:08 ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Joel Brobecker @ 2007-12-19 13:30 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

This fixes the only other instance I could find of the use of an opaque
enum declaration.  The enum type is defined inside defs.h, so I simply
included this file, and removed the enum declaration.

2007-12-19  Joel Brobecker  <brobecker@adacore.com>

        * symtab.h: #include "defs.h".
        (enum language): Remove opaque declaration.
        * Makefile.in (symtab_h): Update dependencies.

Tested on x86-linux by rebuilding GDB.
Checked in.

-- 
Joel

[-- Attachment #2: symtab.h.diff --]
[-- Type: text/plain, Size: 1217 bytes --]

Index: symtab.h
===================================================================
RCS file: /cvs/src/src/gdb/symtab.h,v
retrieving revision 1.108
diff -u -p -r1.108 symtab.h
--- symtab.h	19 Oct 2007 12:26:34 -0000	1.108
+++ symtab.h	19 Dec 2007 13:16:54 -0000
@@ -22,6 +22,8 @@
 #if !defined (SYMTAB_H)
 #define SYMTAB_H 1
 
+#include "defs.h"
+
 /* Opaque declarations.  */
 struct ui_file;
 struct frame_info;
@@ -32,7 +34,6 @@ struct block;
 struct blockvector;
 struct axs_value;
 struct agent_expr;
-enum language;
 
 /* Some of the structures in this file are space critical.
    The space-critical structures are:
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.966
diff -u -p -r1.966 Makefile.in
--- Makefile.in	17 Dec 2007 17:49:28 -0000	1.966
+++ Makefile.in	19 Dec 2007 13:17:07 -0000
@@ -885,7 +885,7 @@ srec_h = srec.h
 stabsread_h = stabsread.h
 stack_h = stack.h
 symfile_h = symfile.h $(symtab_h)
-symtab_h = symtab.h
+symtab_h = symtab.h $(defs_h)
 target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h) $(vec_h)
 target_descriptions_h = target-descriptions.h
 terminal_h = terminal.h

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

* Re: [commit] remove opaque enum declaration in symtab.h
  2007-12-19 13:30 [commit] remove opaque enum declaration in symtab.h Joel Brobecker
@ 2007-12-19 14:08 ` Daniel Jacobowitz
  2007-12-19 14:18   ` Joel Brobecker
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2007-12-19 14:08 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches

On Wed, Dec 19, 2007 at 05:25:46PM +0400, Joel Brobecker wrote:
> This fixes the only other instance I could find of the use of an opaque
> enum declaration.  The enum type is defined inside defs.h, so I simply
> included this file, and removed the enum declaration.
> 
> 2007-12-19  Joel Brobecker  <brobecker@adacore.com>
> 
>         * symtab.h: #include "defs.h".

FYI, this is not necessary; defs.h is always included first and
everything depends on it.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [commit] remove opaque enum declaration in symtab.h
  2007-12-19 14:08 ` Daniel Jacobowitz
@ 2007-12-19 14:18   ` Joel Brobecker
  2007-12-19 14:23     ` Daniel Jacobowitz
  2007-12-19 14:51     ` Mark Kettenis
  0 siblings, 2 replies; 6+ messages in thread
From: Joel Brobecker @ 2007-12-19 14:18 UTC (permalink / raw)
  To: gdb-patches

> > 2007-12-19  Joel Brobecker  <brobecker@adacore.com>
> > 
> >         * symtab.h: #include "defs.h".
> 
> FYI, this is not necessary; defs.h is always included first and
> everything depends on it.

Should I remove it, then? We have other .h files that include defs.h,
perhaps we should take care of them too...

-- 
Joel


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

* Re: [commit] remove opaque enum declaration in symtab.h
  2007-12-19 14:18   ` Joel Brobecker
@ 2007-12-19 14:23     ` Daniel Jacobowitz
  2007-12-19 14:51     ` Mark Kettenis
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2007-12-19 14:23 UTC (permalink / raw)
  To: gdb-patches

On Wed, Dec 19, 2007 at 06:08:31PM +0400, Joel Brobecker wrote:
> > > 2007-12-19  Joel Brobecker  <brobecker@adacore.com>
> > > 
> > >         * symtab.h: #include "defs.h".
> > 
> > FYI, this is not necessary; defs.h is always included first and
> > everything depends on it.
> 
> Should I remove it, then? We have other .h files that include defs.h,
> perhaps we should take care of them too...

IMO, yes, but it's not very important.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [commit] remove opaque enum declaration in symtab.h
  2007-12-19 14:18   ` Joel Brobecker
  2007-12-19 14:23     ` Daniel Jacobowitz
@ 2007-12-19 14:51     ` Mark Kettenis
  2007-12-20  5:52       ` Joel Brobecker
  1 sibling, 1 reply; 6+ messages in thread
From: Mark Kettenis @ 2007-12-19 14:51 UTC (permalink / raw)
  To: brobecker; +Cc: gdb-patches

> Date: Wed, 19 Dec 2007 18:08:31 +0400
> From: Joel Brobecker <brobecker@adacore.com>
> 
> > > 2007-12-19  Joel Brobecker  <brobecker@adacore.com>
> > > 
> > >         * symtab.h: #include "defs.h".
> > 
> > FYI, this is not necessary; defs.h is always included first and
> > everything depends on it.
> 
> Should I remove it, then? We have other .h files that include defs.h,
> perhaps we should take care of them too...

Yes please.

Mark


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

* Re: [commit] remove opaque enum declaration in symtab.h
  2007-12-19 14:51     ` Mark Kettenis
@ 2007-12-20  5:52       ` Joel Brobecker
  0 siblings, 0 replies; 6+ messages in thread
From: Joel Brobecker @ 2007-12-20  5:52 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 651 bytes --]

> > > > 2007-12-19  Joel Brobecker  <brobecker@adacore.com>
> > > > 
> > > >         * symtab.h: #include "defs.h".
> > > 
> > > FYI, this is not necessary; defs.h is always included first and
> > > everything depends on it.
> > 
> > Should I remove it, then? We have other .h files that include defs.h,
> > perhaps we should take care of them too...
> 
> Yes please.

Fixed with the attached patch.

2007-12-20  Joel Brobecker  <brobecker@adacore.com>

        * symtab.h: Remove "defs.h" #include.
        * Makefile.in (symtab_h): Update dependencies.

Thanks for the feedback.  I will send a patch for the remaining
unexpected includes.

-- 
Joel

[-- Attachment #2: defs.diff --]
[-- Type: text/plain, Size: 1008 bytes --]

Index: symtab.h
===================================================================
RCS file: /cvs/src/src/gdb/symtab.h,v
retrieving revision 1.109
diff -u -p -r1.109 symtab.h
--- symtab.h	19 Dec 2007 13:21:32 -0000	1.109
+++ symtab.h	20 Dec 2007 05:31:31 -0000
@@ -22,8 +22,6 @@
 #if !defined (SYMTAB_H)
 #define SYMTAB_H 1
 
-#include "defs.h"
-
 /* Opaque declarations.  */
 struct ui_file;
 struct frame_info;
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.967
diff -u -p -r1.967 Makefile.in
--- Makefile.in	19 Dec 2007 13:21:32 -0000	1.967
+++ Makefile.in	20 Dec 2007 05:31:48 -0000
@@ -885,7 +885,7 @@ srec_h = srec.h
 stabsread_h = stabsread.h
 stack_h = stack.h
 symfile_h = symfile.h $(symtab_h)
-symtab_h = symtab.h $(defs_h)
+symtab_h = symtab.h
 target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h) $(vec_h)
 target_descriptions_h = target-descriptions.h
 terminal_h = terminal.h

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

end of thread, other threads:[~2007-12-20  5:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-19 13:30 [commit] remove opaque enum declaration in symtab.h Joel Brobecker
2007-12-19 14:08 ` Daniel Jacobowitz
2007-12-19 14:18   ` Joel Brobecker
2007-12-19 14:23     ` Daniel Jacobowitz
2007-12-19 14:51     ` Mark Kettenis
2007-12-20  5:52       ` Joel Brobecker

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