* breakpoint.c, breakpoint.h (breakpoint_init_inferior): New function
[deliverable/binutils-gdb.git] / gdb / mipsread.c
index e380150b8ff76e9cf1baa0665b799802310abb74..1c70aa7e142e341717652e53bcffa9d6b04ab7c4 100644 (file)
@@ -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')
This page took 0.023302 seconds and 4 git commands to generate.