Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: [commit] language.h minor cleanup
Date: Mon, 17 Dec 2007 07:14:00 -0000	[thread overview]
Message-ID: <20071217070301.GE32623@adacore.com> (raw)

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

Hello,

This is something I noticed while working on the "struct parse_context"
task: There was one commented-out enum declaration that I decommented,
and also a couple of functions declarations were using struct language_defn
before that struct was defined. I moved these declarations past the
struct declaration.

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

        * language.h (enum exp_opcode): Add forward declaration.
        (language_string_char_type, language_lookup_primitive_type_by_name):
        Move declaration past declaration of language_defn.

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

-- 
Joel

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

Index: language.h
===================================================================
RCS file: /cvs/src/src/gdb/language.h,v
retrieving revision 1.43
diff -u -p -r1.43 language.h
--- language.h	4 Dec 2007 23:33:00 -0000	1.43
+++ language.h	17 Dec 2007 06:59:05 -0000
@@ -30,8 +30,7 @@ struct objfile;
 struct frame_info;
 struct expression;
 struct ui_file;
-
-/* enum exp_opcode;     ANSI's `wisdom' didn't include forward enum decls. */
+enum exp_opcode;
 
 /* This used to be included to configure GDB for one or more specific
    languages.  Now it is left out to configure for all of them.  FIXME.  */
@@ -129,13 +128,6 @@ struct language_arch_info
   struct type *string_char_type;
 };
 
-struct type *language_string_char_type (const struct language_defn *l,
-					struct gdbarch *gdbarch);
-
-struct type *language_lookup_primitive_type_by_name (const struct language_defn *l,
-						     struct gdbarch *gdbarch,
-						     const char *name);
-
 /* Structure tying together assorted information about a language.  */
 
 struct language_defn
@@ -314,6 +306,14 @@ extern enum language_mode
     language_mode_auto, language_mode_manual
   }
 language_mode;
+
+struct type *language_string_char_type (const struct language_defn *l,
+					struct gdbarch *gdbarch);
+
+struct type *language_lookup_primitive_type_by_name (const struct language_defn *l,
+						     struct gdbarch *gdbarch,
+						     const char *name);
+
 \f
 /* These macros define the behaviour of the expression 
    evaluator.  */

             reply	other threads:[~2007-12-17  7:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-17  7:14 Joel Brobecker [this message]
2007-12-17 10:46 ` Mark Kettenis
2007-12-17 11:23   ` Joel Brobecker
2007-12-17 13:31     ` Daniel Jacobowitz
2007-12-17 14:22       ` Joel Brobecker

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=20071217070301.GE32623@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