This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Don't include symtab.h from expression.h


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a930ebcdf9594d6b6f91b634dceec1b2425a76a0

commit a930ebcdf9594d6b6f91b634dceec1b2425a76a0
Author: Tom Tromey <tom@tromey.com>
Date:   Fri Mar 22 16:06:36 2019 -0600

    Don't include symtab.h from expression.h
    
    expression.h includes symtab.h, but apparently only for the
    declaration of struct block.  This patch changes it to foward-declare
    the structure, and remove the include.
    
    gdb/ChangeLog
    2019-03-24  Tom Tromey  <tom@tromey.com>
    
    	* expression.h: Don't include symtab.h.
    	(struct block): Forward declare.

Diff:
---
 gdb/ChangeLog    | 5 +++++
 gdb/expression.h | 3 ---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e4cef31..b831b28 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2019-03-24  Tom Tromey  <tom@tromey.com>
 
+	* expression.h: Don't include symtab.h.
+	(struct block): Forward declare.
+
+2019-03-24  Tom Tromey  <tom@tromey.com>
+
 	* c-exp.y (typebase): Remove casts.
 	* gdbtypes.c (lookup_unsigned_typename, )
 	(lookup_signed_typename): Remove cast.
diff --git a/gdb/expression.h b/gdb/expression.h
index 36f18be..8db4b9d 100644
--- a/gdb/expression.h
+++ b/gdb/expression.h
@@ -20,9 +20,6 @@
 #if !defined (EXPRESSION_H)
 #define EXPRESSION_H 1
 
-
-#include "symtab.h"		/* Needed for "struct block" type.  */
-
 /* While parsing expressions we need to track the innermost lexical block
    that we encounter.  In some situations we need to track the innermost
    block just for symbols, and in other situations we want to track the


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]