diff options
author | Jakub Jelinek <jakub@redhat.com> | 2014-07-03 16:39:05 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2014-07-03 16:39:05 +0200 |
commit | 00a7ba584062ce49f20fd9e10e5396b296b0a7b5 (patch) | |
tree | 0f9f89a40e0f06ad2065a6c8389c198699c9f249 /gcc/c-family | |
parent | e21526739585ce47c37e40c1da738ba42c7a7e02 (diff) | |
download | gcc-00a7ba584062ce49f20fd9e10e5396b296b0a7b5.zip gcc-00a7ba584062ce49f20fd9e10e5396b296b0a7b5.tar.gz gcc-00a7ba584062ce49f20fd9e10e5396b296b0a7b5.tar.bz2 |
gcov-io.c (gcov_read_words): Don't call memmove if excess is 0.
* gcov-io.c (gcov_read_words): Don't call memmove if excess is 0.
* data-streamer-in.c (streamer_read_hwi): Shift UHWI 1 instead of
HWI 1 and negate the unsigned value.
* expmed.c (expand_sdiv_pow2): For modes wider than word always
use AND instead of shift.
* wide-int-print.cc (print_decs): Negate UHWI instead of HWI.
c-family/
* c-ada-spec.c (dump_ada_nodes): Don't call qsort if
comments->count <= 1, as comments->entries might be NULL.
From-SVN: r212264
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c-family/c-ada-spec.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 672c4e8..d667ed8 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2014-07-03 Jakub Jelinek <jakub@redhat.com> + + * c-ada-spec.c (dump_ada_nodes): Don't call qsort if + comments->count <= 1, as comments->entries might be NULL. + 2014-07-01 Marek Polacek <polacek@redhat.com> * c.opt (Wint-conversion): New option. diff --git a/gcc/c-family/c-ada-spec.c b/gcc/c-family/c-ada-spec.c index a21bc49..5142f07 100644 --- a/gcc/c-family/c-ada-spec.c +++ b/gcc/c-family/c-ada-spec.c @@ -636,8 +636,9 @@ dump_ada_nodes (pretty_printer *pp, const char *source_file) comments = cpp_get_comments (parse_in); /* Sort the comments table by sloc. */ - qsort (comments->entries, comments->count, sizeof (cpp_comment), - compare_comment); + if (comments->count > 1) + qsort (comments->entries, comments->count, sizeof (cpp_comment), + compare_comment); /* Interleave comments and declarations in line number order. */ i = j = 0; |