From d26a810ebf9e419556a60bdc0a4190883c38f4c4 Mon Sep 17 00:00:00 2001 From: Andrew Gierth Date: Wed, 20 Feb 2019 21:31:02 +0000 Subject: [PATCH] Use an unsigned char for bool if we don't use the native bool. On (rare) platforms where sizeof(bool) > 1, we need to use our own bool, but imported c99 code (such as Ryu) may want to use bool values as array subscripts, which elicits warnings if bool is defined as char. Using unsigned char instead should work just as well for our purposes, and avoid such warnings. Per buildfarm members prariedog and locust. --- src/include/c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/c.h b/src/include/c.h index 3ea748ff58..658be50e0d 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -305,7 +305,7 @@ #else #ifndef bool -typedef char bool; +typedef unsigned char bool; #endif #ifndef true -- 2.40.0