aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2000-03-29 20:32:04 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2000-03-29 20:32:04 +0200
commitfc9e8a145556a42cff9c98ad30b1c8fda8bbfb44 (patch)
tree3fb9edf326ec604d60fc1bf3ca8f09508342b3b5 /gcc
parent930b9832964a97cf30cfd2b75382b3b7038c54d5 (diff)
downloadgcc-fc9e8a145556a42cff9c98ad30b1c8fda8bbfb44.zip
gcc-fc9e8a145556a42cff9c98ad30b1c8fda8bbfb44.tar.gz
gcc-fc9e8a145556a42cff9c98ad30b1c8fda8bbfb44.tar.bz2
dwarf2out.c (gen_enumeration_type_die): If enum has a negative value, don't output it as unsigned.
* dwarf2out.c (gen_enumeration_type_die): If enum has a negative value, don't output it as unsigned. From-SVN: r32807
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/dwarf2out.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7cffb9f..6d2d771 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-03-29 Jakub Jelinek <jakub@redhat.com>
+
+ * dwarf2out.c (gen_enumeration_type_die): If enum has a negative
+ value, don't output it as unsigned.
+
Wed Mar 29 10:53:49 2000 Jeffrey A Law (law@cygnus.com)
* stmt.c (stmt_loop_nest_empty): Allow cfun->stmt to be NULL.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index eb9630c..c493d54 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -7905,8 +7905,14 @@ gen_enumeration_type_die (type, context_die)
IDENTIFIER_POINTER (TREE_PURPOSE (link)));
if (host_integerp (TREE_VALUE (link), 0))
- add_AT_unsigned (enum_die, DW_AT_const_value,
- tree_low_cst (TREE_VALUE (link), 0));
+ {
+ if (tree_int_cst_sgn (TREE_VALUE (link)) < 0)
+ add_AT_int (enum_die, DW_AT_const_value,
+ tree_low_cst (TREE_VALUE (link), 0));
+ else
+ add_AT_unsigned (enum_die, DW_AT_const_value,
+ tree_low_cst (TREE_VALUE (link), 0));
+ }
}
}
else