From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: [RFA/commit] #include language.h in expression.h
Date: Mon, 17 Dec 2007 07:19:00 -0000 [thread overview]
Message-ID: <20071217071344.GD9022@adacore.com> (raw)
[-- 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
next reply other threads:[~2007-12-17 7:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-17 7:19 Joel Brobecker [this message]
2007-12-17 14:11 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071217071344.GD9022@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox