* ieee.c (ieee_enum_type): Handle an undefined enum.
This commit is contained in:
parent
36302909f2
commit
499452f3cc
1 changed files with 15 additions and 9 deletions
|
@ -3307,6 +3307,8 @@ ieee_enum_type (p, tag, names, vals)
|
|||
use type N. */
|
||||
|
||||
simple = true;
|
||||
if (names != NULL)
|
||||
{
|
||||
for (i = 0; names[i] != NULL; i++)
|
||||
{
|
||||
if (vals[i] != i)
|
||||
|
@ -3315,6 +3317,7 @@ ieee_enum_type (p, tag, names, vals)
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! ieee_define_named_type (info, tag, true, 0, true,
|
||||
(struct ieee_buf **) NULL)
|
||||
|
@ -3327,6 +3330,8 @@ ieee_enum_type (p, tag, names, vals)
|
|||
if (! ieee_write_number (info, 4))
|
||||
return false;
|
||||
}
|
||||
if (names != NULL)
|
||||
{
|
||||
for (i = 0; names[i] != NULL; i++)
|
||||
{
|
||||
if (! ieee_write_id (info, names[i]))
|
||||
|
@ -3337,6 +3342,7 @@ ieee_enum_type (p, tag, names, vals)
|
|||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue