OSDN Git Service

(dbxout_type): Handle enum constants bigger than one word.
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 Sep 1993 12:27:26 +0000 (12:27 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 Sep 1993 12:27:26 +0000 (12:27 +0000)
Don't print big unsigned values as negative.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5273 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/dbxout.c

index 1bf21af..8e8c08a 100644 (file)
@@ -1244,9 +1244,18 @@ dbxout_type (type, full, show_arg_types)
       CHARS (1);
       for (tem = TYPE_VALUES (type); tem; tem = TREE_CHAIN (tem))
        {
-         fprintf (asmfile, "%s:%d,", IDENTIFIER_POINTER (TREE_PURPOSE (tem)),
-                  TREE_INT_CST_LOW (TREE_VALUE (tem)));
-         CHARS (11 + IDENTIFIER_LENGTH (TREE_PURPOSE (tem)));
+         fprintf (asmfile, "%s:", IDENTIFIER_POINTER (TREE_PURPOSE (tem)));
+         if (TREE_INT_CST_HIGH (TREE_VALUE (tem)) == 0)
+           {
+             if (TREE_INT_CST_LOW (TREE_VALUE (tem)) < 0)
+               fprintf (asmfile, "%u", TREE_INT_CST_LOW (TREE_VALUE (tem)));
+             else
+               fprintf (asmfile, "%d", TREE_INT_CST_LOW (TREE_VALUE (tem)));
+           }
+         else
+           print_int_cst_octal (TREE_VALUE (tem));
+         fprintf (asmfile, ",");
+         CHARS (20 + IDENTIFIER_LENGTH (TREE_PURPOSE (tem)));
          if (TREE_CHAIN (tem) != 0)
            CONTIN;
        }