r16-3465 diagnostics: add GCC_DIAGNOSTICS_LOG broke bootstrap on
32b Darwin hosts, this fix tested on i686-darwin9, 17 and on
x86_64, aarch64 and powerpc64le - linux, pushed to trunk as obvious
and fixing bootstrap. Thanks,
Iain
--- 8< ---
The use of HOST_SIZE_T_PRINT_HEX needs to be paired with a c-style
cast to (fmt_size_t) otherwise the detection mechanisms in hwint.h
are not sufficient to deal with size_t defined as 'long unsigned int'
which is done on Darwin (and I think on Windows).
This patch just makes that update.
gcc/ChangeLog:
* diagnostics/logging.h (log_param_location_t): Cast
location_t value to fmt_size_t.
Signed-off-by: Iain Sandoe <[email protected]>
---
gcc/diagnostics/logging.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/diagnostics/logging.h b/gcc/diagnostics/logging.h
index 2ce0166aad5..34ca95be13b 100644
--- a/gcc/diagnostics/logging.h
+++ b/gcc/diagnostics/logging.h
@@ -127,7 +127,7 @@ public:
add_any_comma ();
fprintf (m_logger->get_stream (),
"%s: " HOST_SIZE_T_PRINT_HEX,
- name, (size_t)value);
+ name, (fmt_size_t)value);
}
return *this;
}
--
2.39.2 (Apple Git-143)