]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
diagnostics: Fix bootstrap fail on Darwin 32b hosts.
authorIain Sandoe <iain@sandoe.co.uk>
Mon, 1 Sep 2025 15:49:38 +0000 (16:49 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Mon, 1 Sep 2025 18:17:13 +0000 (19:17 +0100)
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 <iain@sandoe.co.uk>
gcc/diagnostics/logging.h

index 2ce0166aad53d8e86c44574ca2c1705a546cf42b..34ca95be13b5d6de2cb3c84b2394e0749c47bd62 100644 (file)
@@ -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;
   }