diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-23 10:45:46 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-23 10:45:46 +0000 |
commit | 6558a2fd0895106f300f2f9e5df1fd9aaa562100 (patch) | |
tree | fee7271f662e8d2a30153b4da44d8e7f80928458 /gcc/c-family | |
parent | d601a962f4505f0362c2043ab8d947690aee6d6a (diff) | |
download | gcc-6558a2fd0895106f300f2f9e5df1fd9aaa562100.tar.gz |
Fix some off-by-one errors and bounds tests
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@209687 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/c-ada-spec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/c-family/c-ada-spec.c b/gcc/c-family/c-ada-spec.c index 0a28840aaee..a21bc498d07 100644 --- a/gcc/c-family/c-ada-spec.c +++ b/gcc/c-family/c-ada-spec.c @@ -2205,8 +2205,9 @@ dump_generic_ada_node (pretty_printer *buffer, tree node, tree type, int spc, val = -val; } sprintf (pp_buffer (buffer)->digit_buffer, - "16#%" HOST_WIDE_INT_PRINT "x", val.elt (val.get_len () - 1)); - for (i = val.get_len () - 2; i <= 0; i--) + "16#%" HOST_WIDE_INT_PRINT "x", + val.elt (val.get_len () - 1)); + for (i = val.get_len () - 2; i >= 0; i--) sprintf (pp_buffer (buffer)->digit_buffer, HOST_WIDE_INT_PRINT_PADDED_HEX, val.elt (i)); pp_string (buffer, pp_buffer (buffer)->digit_buffer); |