From: Jakub Jelinek Date: Tue, 27 Jul 2010 15:47:43 +0000 (+0200) Subject: dwarf2out.c (add_data_member_location_attribute): Use add_AT_unsigned instead of... X-Git-Tag: releases/gcc-4.6.0~5399 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f39bd531612c767cbcf0148b3baa95a9122453e;p=thirdparty%2Fgcc.git dwarf2out.c (add_data_member_location_attribute): Use add_AT_unsigned instead of add_AT_int if offset is non-negative. * dwarf2out.c (add_data_member_location_attribute): Use add_AT_unsigned instead of add_AT_int if offset is non-negative. From-SVN: r162576 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3ca65bb0d5e5..9399d1ca10e6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-07-27 Jakub Jelinek + + * dwarf2out.c (add_data_member_location_attribute): Use + add_AT_unsigned instead of add_AT_int if offset is non-negative. + 2010-07-27 Bernd Schmidt * postreload.c (try_replace_in_use): New static function. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 1ca53bb96c13..d6751ac1dc2e 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -15915,7 +15915,10 @@ add_data_member_location_attribute (dw_die_ref die, tree decl) if (dwarf_version > 2) { /* Don't need to output a location expression, just the constant. */ - add_AT_int (die, DW_AT_data_member_location, offset); + if (offset < 0) + add_AT_int (die, DW_AT_data_member_location, offset); + else + add_AT_unsigned (die, DW_AT_data_member_location, offset); return; } else