aboutsummaryrefslogtreecommitdiff
path: root/gdb/mipsread.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-09-18 21:11:25 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-09-18 21:11:25 +0000
commit1fdbc4d17b058ba8b425188fbe77f68987bf2951 (patch)
tree06db202a02a69409382c81ccf8f0db39ecb84ca4 /gdb/mipsread.c
parent84d598611e42de0248b0e7689e4ebe062e1699b6 (diff)
downloadgdb-1fdbc4d17b058ba8b425188fbe77f68987bf2951.zip
gdb-1fdbc4d17b058ba8b425188fbe77f68987bf2951.tar.gz
gdb-1fdbc4d17b058ba8b425188fbe77f68987bf2951.tar.bz2
* mipsread.c (parse_type): Don't complain() if we guessed struct
and it was a union, or vice versa.
Diffstat (limited to 'gdb/mipsread.c')
-rw-r--r--gdb/mipsread.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gdb/mipsread.c b/gdb/mipsread.c
index e380150..1c70aa7 100644
--- a/gdb/mipsread.c
+++ b/gdb/mipsread.c
@@ -1466,12 +1466,22 @@ parse_type (fd, ax, bs, bigend, sym_name)
{
/* Usually, TYPE_CODE(tp) is already type_code. The main
- exception is if we guessed wrong re struct/union/enum. */
- if (TYPE_CODE (tp) != type_code)
+ exception is if we guessed wrong re struct/union/enum.
+ But for struct vs. union a wrong guess is harmless, so
+ don't complain(). */
+ if ((TYPE_CODE (tp) == TYPE_CODE_ENUM
+ && type_code != TYPE_CODE_ENUM)
+ || (TYPE_CODE (tp) != TYPE_CODE_ENUM
+ && type_code == TYPE_CODE_ENUM))
{
complain (&bad_tag_guess_complaint, sym_name);
+ }
+
+ if (TYPE_CODE (tp) != type_code)
+ {
TYPE_CODE (tp) = type_code;
}
+
/* Do not set the tag name if it is a compiler generated tag name
(.Fxx or .xxfake or empty) for unnamed struct/union/enums. */
if (name[0] == '.' || name[0] == '\0')