diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-01-30 19:11:33 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-01-30 19:11:33 +0100 |
commit | cc0608e7a069c110954aeab97b39e725cd06395f (patch) | |
tree | d38b050748f60b20ffc8607d5d394fdde4f1eb03 /gcc/brig | |
parent | f1860ba97c381a17281e33a895bbad4f5006d43b (diff) | |
download | gcc-cc0608e7a069c110954aeab97b39e725cd06395f.zip gcc-cc0608e7a069c110954aeab97b39e725cd06395f.tar.gz gcc-cc0608e7a069c110954aeab97b39e725cd06395f.tar.bz2 |
* brigfrontend/brig-code-entry-handler.cc
(brig_code_entry_handler::get_tree_cst_for_hsa_operand): For %lu
cast size_t arguments to unsigned long.
From-SVN: r245036
Diffstat (limited to 'gcc/brig')
-rw-r--r-- | gcc/brig/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/brig/brigfrontend/brig-code-entry-handler.cc | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gcc/brig/ChangeLog b/gcc/brig/ChangeLog index 2906f50..79035a2 100644 --- a/gcc/brig/ChangeLog +++ b/gcc/brig/ChangeLog @@ -1,3 +1,9 @@ +2017-01-30 Jakub Jelinek <jakub@redhat.com> + + * brigfrontend/brig-code-entry-handler.cc + (brig_code_entry_handler::get_tree_cst_for_hsa_operand): For %lu + cast size_t arguments to unsigned long. + 2017-01-27 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com> * config-lang.in: Removed stale target-libbrig reference. diff --git a/gcc/brig/brigfrontend/brig-code-entry-handler.cc b/gcc/brig/brigfrontend/brig-code-entry-handler.cc index b78005a..eb32c51 100644 --- a/gcc/brig/brigfrontend/brig-code-entry-handler.cc +++ b/gcc/brig/brigfrontend/brig-code-entry-handler.cc @@ -606,8 +606,9 @@ brig_code_entry_handler::get_tree_cst_for_hsa_operand if (bytes_left < scalar_element_size * element_count) fatal_error (UNKNOWN_LOCATION, "Not enough bytes left for the initializer " - "(%lu need %lu).", - bytes_left, scalar_element_size * element_count); + "(%lu need %lu).", (unsigned long) bytes_left, + (unsigned long) (scalar_element_size + * element_count)); vec<constructor_elt, va_gc> *vec_els = NULL; for (size_t i = 0; i < element_count; ++i) @@ -625,8 +626,8 @@ brig_code_entry_handler::get_tree_cst_for_hsa_operand if (bytes_left < scalar_element_size) fatal_error (UNKNOWN_LOCATION, "Not enough bytes left for the initializer " - "(%lu need %lu).", - bytes_left, scalar_element_size); + "(%lu need %lu).", (unsigned long) bytes_left, + (unsigned long) scalar_element_size); cst = build_tree_cst_element (scalar_element_type, next_data); bytes_left -= scalar_element_size; next_data += scalar_element_size; |