aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-11-03 09:48:51 +0000
committerRichard Stallman <rms@gnu.org>1993-11-03 09:48:51 +0000
commit4c3ddf05dc922e852f95d115f3449f6b119decd8 (patch)
tree644eaea8ae506d4d384fd7f81dc05e7b5119d15a /gcc
parent41b21cfc17e6648120f83bad22cfb1df2a670b71 (diff)
downloadgcc-4c3ddf05dc922e852f95d115f3449f6b119decd8.zip
gcc-4c3ddf05dc922e852f95d115f3449f6b119decd8.tar.gz
gcc-4c3ddf05dc922e852f95d115f3449f6b119decd8.tar.bz2
(dbxout_type): Print `-2' instead of `0037777777776' for an enumeration constant whose value is -2...
(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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/dbxout.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index e2182e9..8308ab8 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -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, ",");