Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d26a810

Browse files
committed
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.
1 parent e04a390 commit d26a810

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/include/c.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@
305305
#else
306306

307307
#ifndef bool
308-
typedef char bool;
308+
typedef unsigned char bool;
309309
#endif
310310

311311
#ifndef true

0 commit comments

Comments
 (0)