* brigfrontend/brig-code-entry-handler.cc
authorJakub Jelinek <jakub@redhat.com>
Mon, 30 Jan 2017 18:11:33 +0000 (19:11 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 30 Jan 2017 18:11:33 +0000 (19:11 +0100)
(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
gcc/brig/brigfrontend/brig-code-entry-handler.cc

index 2906f50beed7c6572de0074d559a973566198de4..79035a2fc4726f8e988138a6281f98f1782949f9 100644 (file)
@@ -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.
index b78005aa9109862c93bcb8b2c0adb237a149aec2..eb32c51bc80ee0424e47cd8f082fffff3dda63d4 100644 (file)
@@ -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;