aboutsummaryrefslogtreecommitdiff
path: root/binutils/ieee.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-01-11 17:33:47 +0000
committerIan Lance Taylor <ian@airs.com>1996-01-11 17:33:47 +0000
commit499452f3cc3eb569082dd054ad6e146040322491 (patch)
tree43dd17c727f8fc20ab2ecbdf24cfeb90fe54af54 /binutils/ieee.c
parent36302909f2b0b51c792b8c775ac53c6d404f7d25 (diff)
downloadgdb-499452f3cc3eb569082dd054ad6e146040322491.zip
gdb-499452f3cc3eb569082dd054ad6e146040322491.tar.gz
gdb-499452f3cc3eb569082dd054ad6e146040322491.tar.bz2
* ieee.c (ieee_enum_type): Handle an undefined enum.
Diffstat (limited to 'binutils/ieee.c')
-rw-r--r--binutils/ieee.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/binutils/ieee.c b/binutils/ieee.c
index fcb71c8..ac85f73 100644
--- a/binutils/ieee.c
+++ b/binutils/ieee.c
@@ -3307,12 +3307,15 @@ ieee_enum_type (p, tag, names, vals)
use type N. */
simple = true;
- for (i = 0; names[i] != NULL; i++)
+ if (names != NULL)
{
- if (vals[i] != i)
+ for (i = 0; names[i] != NULL; i++)
{
- simple = false;
- break;
+ if (vals[i] != i)
+ {
+ simple = false;
+ break;
+ }
}
}
@@ -3327,14 +3330,17 @@ ieee_enum_type (p, tag, names, vals)
if (! ieee_write_number (info, 4))
return false;
}
- for (i = 0; names[i] != NULL; i++)
+ if (names != NULL)
{
- if (! ieee_write_id (info, names[i]))
- return false;
- if (! simple)
+ for (i = 0; names[i] != NULL; i++)
{
- if (! ieee_write_number (info, vals[i]))
+ if (! ieee_write_id (info, names[i]))
return false;
+ if (! simple)
+ {
+ if (! ieee_write_number (info, vals[i]))
+ return false;
+ }
}
}