From cc0608e7a069c110954aeab97b39e725cd06395f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 30 Jan 2017 19:11:33 +0100 Subject: [PATCH] * 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 --- gcc/brig/ChangeLog | 6 ++++++ 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 2906f50beed..79035a2fc47 100644 --- a/gcc/brig/ChangeLog +++ b/gcc/brig/ChangeLog @@ -1,3 +1,9 @@ +2017-01-30 Jakub Jelinek + + * 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 * 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 b78005aa910..eb32c51bc80 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 *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; -- 2.30.2