]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
From Peter Schauer <peterschauer@gmx.net>
authorJoel Brobecker <brobecker@gnat.com>
Sat, 27 May 2006 17:50:50 +0000 (17:50 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Sat, 27 May 2006 17:50:50 +0000 (17:50 +0000)
        * m2-typeprint.c (m2_record_fields): Move variable declarations
        to the begining of the block.

gdb/ChangeLog
gdb/m2-typeprint.c

index 7fa4079c9bd2e808ecd0ccfb80e230fe6c750c07..810e44186f1d59d8c24cb332835355648cc5721f 100644 (file)
@@ -1,3 +1,9 @@
+2006-05-27  Joel Brobecker  <brobecker@adacore.com>
+
+       From Peter Schauer <peterschauer@gmx.net>
+       * m2-typeprint.c (m2_record_fields): Move variable declarations
+       to the begining of the block.
+
 2006-05-20  Gaius Mulley  <gaius@glam.ac.uk>
 
        * NEWS: (Improved Modula-2 language support): New section.
index 160305c7869dae181c70456bcaa71fe83c4d06f8..e057b65ce3c7b075e6598a83cf25ad4ef011769e 100644 (file)
@@ -504,13 +504,14 @@ m2_record_fields (struct type *type, struct ui_file *stream, int show,
     }
   else if (show > 0)
     {
+      int i;
+      int len = TYPE_NFIELDS (type);
+
       if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
        fprintf_filtered (stream, "RECORD\n");
       else if (TYPE_CODE (type) == TYPE_CODE_UNION)
        /* i18n: Do not translate "CASE" and "OF" */
        fprintf_filtered (stream, _("CASE <variant> OF\n"));
-      int i;
-      int len = TYPE_NFIELDS (type);
 
       for (i = TYPE_N_BASECLASSES (type); i < len; i++)
        {