]> gcc.gnu.org Git - gcc.git/commitdiff
(dbxout_type): Print `-2' instead of `0037777777776' for an enumeration constant...
authorRichard Stallman <rms@gnu.org>
Wed, 3 Nov 1993 09:48:51 +0000 (09:48 +0000)
committerRichard Stallman <rms@gnu.org>
Wed, 3 Nov 1993 09:48:51 +0000 (09:48 +0000)
(dbxout_type): Print `-2' instead of `0037777777776'
for an enumeration constant whose value is -2;
otherwise, GDB 4.11 rejects the type.

From-SVN: r5979

gcc/dbxout.c

index e2182e901e576f64f0428cf88e3a0d21c85e8ca6..8308ab8fd69c687313655c86bb76bca283fd0999 100644 (file)
@@ -1270,12 +1270,12 @@ dbxout_type (type, full, show_arg_types)
        {
          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)));
-           }
+           fprintf (asmfile, "%lu",
+                    (unsigned long) TREE_INT_CST_LOW (TREE_VALUE (tem)));
+         else if (TREE_INT_CST_HIGH (TREE_VALUE (tem)) == -1
+                  && TREE_INT_CST_LOW (TREE_VALUE (tem)) < 0)
+           fprintf (asmfile, "%ld",
+                    (long) TREE_INT_CST_LOW (TREE_VALUE (tem)));
          else
            print_int_cst_octal (TREE_VALUE (tem));
          fprintf (asmfile, ",");
This page took 0.064237 seconds and 5 git commands to generate.