From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16029 invoked by alias); 17 Dec 2007 07:14:02 -0000 Received: (qmail 16015 invoked by uid 22791); 17 Dec 2007 07:14:00 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 17 Dec 2007 07:13:54 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id BFFA12A9640 for ; Mon, 17 Dec 2007 02:13:52 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 6zVAQEGk9QOZ for ; Mon, 17 Dec 2007 02:13:52 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id E0D862A963E for ; Mon, 17 Dec 2007 02:13:51 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 78C2EE7ACA; Mon, 17 Dec 2007 08:13:44 +0100 (CET) Date: Mon, 17 Dec 2007 07:19:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [RFA/commit] #include language.h in expression.h Message-ID: <20071217071344.GD9022@adacore.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="rJwd6BRFiFCcLxzm" Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-12/txt/msg00258.txt.bz2 --rJwd6BRFiFCcLxzm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 940 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 * expression.h: Add #include "language.h". * Makefile.in (expression_h): Add dependency on language.h. Any objections? -- Joel --rJwd6BRFiFCcLxzm Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="expression.h.diff" Content-length: 1103 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 --rJwd6BRFiFCcLxzm--