diff options
author | Joel Brobecker <brobecker@gnat.com> | 2006-05-27 17:39:29 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2006-05-27 17:39:29 +0000 |
commit | 5648af48fbb248cc37aab894165ffd344ee03cd5 (patch) | |
tree | dd6cb2d5aa28f07f32778228d81d02f84e8324c8 /gdb/m2-typeprint.c | |
parent | 3f570048d764dc9730cfbcf0b84b707333124f1c (diff) | |
download | fsf-binutils-gdb-5648af48fbb248cc37aab894165ffd344ee03cd5.zip fsf-binutils-gdb-5648af48fbb248cc37aab894165ffd344ee03cd5.tar.gz fsf-binutils-gdb-5648af48fbb248cc37aab894165ffd344ee03cd5.tar.bz2 |
From Peter Schauer <peterschauer@gmx.net>
* m2-typeprint.c (m2_record_fields): Move variable declarations
to the begining of the block.
Diffstat (limited to 'gdb/m2-typeprint.c')
-rw-r--r-- | gdb/m2-typeprint.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/m2-typeprint.c b/gdb/m2-typeprint.c index 160305c..e057b65 100644 --- a/gdb/m2-typeprint.c +++ b/gdb/m2-typeprint.c @@ -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++) { |