Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA/commit] #include language.h in expression.h
@ 2007-12-17  7:19 Joel Brobecker
  2007-12-17 14:11 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Joel Brobecker @ 2007-12-17  7:19 UTC (permalink / raw)
  To: gdb-patches

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

Hello,

Also while working on using "struct parse_context", I found that
expression.h is using some declarations made in language.h. As of
now, the only declaration that it is using is "struct language_defn *".
So we could possible add an advance stub declaration to fix the problem.

But in "[RFC/RFA] Introduce new struct parse_context"
(http://www.sourceware.org/ml/gdb-patches/2007-12/msg00255.html),
I am introducing the use of current_language through the
current_parse_context macro too.

I think we are better off including "language.h" from "expression.h"
rather than not, because we will then be certain that any file including
expression.h can use our macro without needing another include. This is
what the attached patch does.

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

        * expression.h: Add #include "language.h".
        * Makefile.in (expression_h): Add dependency on language.h.

Any objections?

-- 
Joel

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

Index: expression.h
===================================================================
RCS file: /cvs/src/src/gdb/expression.h,v
retrieving revision 1.25
diff -u -p -r1.25 expression.h
--- expression.h	16 Dec 2007 13:31:46 -0000	1.25
+++ expression.h	17 Dec 2007 07:07:10 -0000
@@ -24,6 +24,7 @@
 
 #include "symtab.h"		/* Needed for "struct block" type. */
 #include "doublest.h"		/* Needed for DOUBLEST.  */
+#include "language.h"
 
 
 /* Definitions for saved C expressions.  */
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.965
diff -u -p -r1.965 Makefile.in
--- Makefile.in	6 Dec 2007 11:17:03 -0000	1.965
+++ Makefile.in	17 Dec 2007 07:07:19 -0000
@@ -765,7 +765,7 @@ event_loop_h = event-loop.h
 event_top_h = event-top.h
 exceptions_h = exceptions.h $(ui_out_h)
 exec_h = exec.h $(target_h)
-expression_h = expression.h $(symtab_h) $(doublest_h)
+expression_h = expression.h $(symtab_h) $(doublest_h) $(language_h)
 fbsd_nat_h = fbsd-nat.h
 f_lang_h = f-lang.h
 frame_base_h = frame-base.h

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

* Re: [RFA/commit] #include language.h in expression.h
  2007-12-17  7:19 [RFA/commit] #include language.h in expression.h Joel Brobecker
@ 2007-12-17 14:11 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2007-12-17 14:11 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches

On Mon, Dec 17, 2007 at 11:13:44AM +0400, Joel Brobecker wrote:
> Any objections?

None from me.

-- 
Daniel Jacobowitz
CodeSourcery


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

end of thread, other threads:[~2007-12-17 13:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-17  7:19 [RFA/commit] #include language.h in expression.h Joel Brobecker
2007-12-17 14:11 ` Daniel Jacobowitz

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