diff options
author | Alex Rønne Petersen <alexrp@xamarin.com> | 2014-06-07 19:57:46 +0400 |
---|---|---|
committer | Alex Rønne Petersen <alexrp@xamarin.com> | 2014-06-07 19:57:46 +0400 |
commit | d6aee5a283074d1bfa6c82e0b650fe75c6f2e51e (patch) | |
tree | bf226a82581390dcf4382aaf8121fc2e176b69f1 /eglib | |
parent | bf703c4a8f95db4859452474499038c7539ea3c7 (diff) |
Disable -Warray-bounds in eglib/src/sort.frag.h!insert_list in GCC 4.6.0+.
Diffstat (limited to 'eglib')
-rw-r--r-- | eglib/src/sort.frag.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/eglib/src/sort.frag.h b/eglib/src/sort.frag.h index 2cf5a9ba1f3..8a98c66f644 100644 --- a/eglib/src/sort.frag.h +++ b/eglib/src/sort.frag.h @@ -124,6 +124,14 @@ sweep_up (struct sort_info *si, list_node *list, int upto) static inline void insert_list (struct sort_info *si, list_node* list, int rank) { +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) + /* + * GCC incorrectly thinks we're writing below si->ranks array bounds. + */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif + int i; if (rank > si->n_ranks) { @@ -149,6 +157,10 @@ insert_list (struct sort_info *si, list_node* list, int rank) si->n_ranks = i + 1; si->min_rank = i; si->ranks [i] = list; + +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) +#pragma GCC diagnostic pop +#endif } #undef stringify2 |